7. lazy enumerators
build an internal block and iterates only once
enumerate infinite or very large datasets
iterate on a file without loading it all
map
flat_map
select
reject
grep
zip
take
take_while
drop
drop_while
cycle
12. so, what's new ?
module#prepend
declarations of the module overwrite those in the class
Array#bsearch { |x| block }
elements have to be ordered or nil is returned
Enumerator#size, Range#size
#to_h
convert Struct and OpenStruct to Hash
%i and %I
%i{one two three} => [:one, :two, :three]
Dtrace support
13. what changed ?
onigmo (new regex engine)
positive and negative lookbehind, named captures, backreferences improved
garbage collector
bitmap marking, smaller memory footprint
psych (use libyaml)
default encoding now is UTF-8
respond_to? returns false for protected methods
iconv has been removed
use String#encode instead