0% found this document useful (0 votes)
3 views7 pages

Documentation AOSE01

The document outlines changes since the 1.8.6 release, including the introduction of a new 'vendor_ruby' directory for library separation and new global constants like RUBY_COPYRIGHT and RUBY_DESCRIPTION. It details various updates to built-in classes and methods across Array, Enumerable, Hash, Integer, IO, Module, String, and more, including new methods and enhancements to existing ones. Additionally, it mentions the implementation of the Process.exec and the new StopIteration exception class.

Uploaded by

nekagi1377
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views7 pages

Documentation AOSE01

The document outlines changes since the 1.8.6 release, including the introduction of a new 'vendor_ruby' directory for library separation and new global constants like RUBY_COPYRIGHT and RUBY_DESCRIPTION. It details various updates to built-in classes and methods across Array, Enumerable, Hash, Integer, IO, Module, String, and more, including new methods and enhancements to existing ones. Additionally, it mentions the implementation of the Process.exec and the new StopIteration exception class.

Uploaded by

nekagi1377
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

Changes since the 1.8.

6 release
Configuration changes
default C flags

Some C compiler flags may be added by default depending on your environment.


Specify optflags=.. and warnflags=.. as necessary to override them.

vendor_ruby directory

A new library directory named ‘vendor_ruby’ is introduced in addition to


‘site_ruby’. The idea is to separate libraries installed by the package system
(‘vendor’) from manually (‘site’) installed libraries preventing the former from
getting overwritten by the latter, while preserving the user option to override
vendor libraries with site libraries. (‘site_ruby’ takes precedence over
‘vendor_ruby’)

If you are a package maintainer, make each library package configure the library
passing the ‘–vendor’ option to ‘extconf.rb’ so that the library files will get
installed under ‘vendor_ruby’.

You can change the directory locations using configure options such as ‘–with-
sitedir=DIR’ and ‘–with-vendordir=DIR’.

Global constants
new constants

RUBY_COPYRIGHT

RUBY_DESCRIPTION

Library updates (outstanding ones only)


new library

securerandom

builtin classes

Array#flatten

Array#flatten!

Takes an optional argument that determines the level of recursion to flatten.

Array#eql?

Array#hash

Array#==

Array#<=>

Handle recursive data properly.

Array#index

Array#rindex

Use a given block if no argument is given.


Array#collect!

Array#map!

Array#each

Array#each_index

Array#reverse_each

Array#reject

Array#reject!

Array#delete_if

Array#select

Return an enumerator if no block is given.

Note that map and collect still return an array unlike Ruby 1.9 to keep
compatibility.

Array#pop

Array#shift

Take an optional argument specifying the number of elements to remove.

Array#choice

Array#combination

Array#cycle

Array#drop

Array#drop_while

Array#permutation

Array#product

Array#shuffle

Array#shuffle!

Array#take,

Array#take_while

New methods.

Binding#eval

New method.

Dir#each
Dir#foreach

Return an enumerator if no block is given.

Enumerable::Enumerator

New class for various enumeration defined by the enumerator library.

Enumerable#each_slice

Enumerable#each_cons

Object#to_enum

Object#enum_for

New methods for various enumeration defined by the enumerator library.

Enumerable#count

Enumerable#cycle

Enumerable#drop

Enumerable#drop_while

Enumerable#find_index

Enumerable#first

Enumerable#group_by

Enumerable#max_by

Enumerable#min_by

Enumerable#minmax

Enumerable#minmax_by

Enumerable#none?

Enumerable#one?

Enumerable#take

Enumerable#take_while

New methods.

Enumerable#find

Enumerable#find_all

Enumerable#partition

Enumerable#reject

Enumerable#select
Enumerable#sort_by

Return an enumerator if no block is given.

Note that map and collect still return an array unlike Ruby 1.9 to keep
compatibility.

Enumerable#inject

Accepts a binary operator instead of a block.

Enumerable#reduce

New alias to inject.

Enumerable#to_a

Can take optional arguments and pass them to each.

Hash#eql?

Hash#hash

Hash#==

Handle recursive data properly.

Hash#delete_if

Hash#each

Hash#each_key

Hash#each_pair

Hash#each_value

Hash#reject!

Hash#select

ENV.delete_if

ENV.each

ENV.each_key

ENV.each_pair

ENV.each_value

ENV.reject!

ENV.select

Return an enumerator if no block is given.

GC.stress
GC.stress=

New methods.

Integer#ord

Integer#odd?

Integer#even?

Integer#pred

New methods.

Integer#downto

Integer#times

Integer#upto

Return an enumerator if no block is given.

IO#each

IO#each_line

IO#each_byte

IO.foreach

ARGF.each

ARGF.each_line

ARGF.each_byte

Return an enumerator if no block is given.

IO#bytes

IO#chars

IO#each_char

IO#getbyte

IO#lines

IO#readbyte

ARGF.bytes

ARGF.chars

ARGF.each_char

ARGF.getbyte
ARGF.lines

ARGF.readbyte

New methods.

Method#name

Method#owner

Method#receiver

UnboundMethod#name

UnboundMethod#owner

New methods.

Module#class_exec

Module#module_exec

New methods.

Numeric#step

Return an enumerator if no block is given.

Object#instance_exec

Object#tap

New methods.

ObjectSpace.each_object

Return an enumerator if no block is given.

Process.exec implemented.

Range#each

Range#step

Return an enumerator if no block is given.

Regexp.union accepts an array of patterns.

String#bytes

New method

String#bytesize

New method, returning the size in bytes. (alias length and size)

String#chars

String#each_char
String#lines

String#partition

String#rpartition

String#start_with?

String#end_with?

New methods. These are $KCODE aware unlike index, rindex and include?.

String#each_byte

String#each

String#each_line

String#gsub(pattern)

Return an enumerator if no block is given.

String#upto

An optional second argument is added to specify if the last value should be


included.

StopIteration

New exception class that causes Kernel#loop to stop iteration when raised.

Struct#each

Struct#each_pair

Return an enumerator if no block is given.

Symbol#to_proc

New method.

__method__

New global function that returns the name of the current method as a Symbol.

enumerator

Enumerator is now a built-in module. The next and rewind methods are implemented
using the “generator” library. Use with care and be aware of the performance loss.

You might also like