Hi all, This is a summary of ruby-dev ML in these days. (ruby-dev 23459-23487 + 23488-23562) [ruby-dev:23465] Re: [ruby-talk:99318] 0.0000000000000000001 == 0.0 should be false As matz said in [ruby-talk:99375], H.Yamamoto made a patch on the problem of [ruby-talk:99318] and commited it. -- TAKAHASHI Masayoshi [ruby-dev:23511] [Oniguruma] Version 3.0.0 K.Kosako released Oniguruma 3.0.0. New features of this release are: * UTF-16 BE, LE support * works with ruby 1.9 only (1.6/1.8 supported is removed) [ruby-dev:23520] DBM::READER Tanaka Akira proposed a new flag DBM::READER, to open a DBM in read-only mode. Matz agreed with him and the patch is incorporated. [ruby-dev:23533] specifications of parameters and variables in Ruby 2.0 SASADA Koichi posted a summary of the latest specifications of method parameters, block parameters and block variables that he heard from matz. [Local Variables] * Local variables are method-local. * Block parameters are block-local. * The name space of local variables and one of block parameters are exclusive. e.g. i = 1 iter {|i| # causes error .... } [Return Values and Parameter Passing] * `return a, b', `yield a, b' and `*array' makes a Values object. return 1, 2 --> Values(1,2) yield 1, 2 --> Values(1,2) *[1, 2] --> Values(1,2) * Multiple assignment takes care of only Values objects. a, b = 1 # a=1, b=nil a, = 1 # a=1 a, * = 1 # a=1 *a = 1 # a=[1] * = 1 # (ignored) a = 1 # a=1 a, b = Values(1,2) # a=1, b=2 a, = Values(1,2) # a=1 a, * = Values(1,2) # a=1 *a = Values(1,2) # a=[1,2] * = Values(1,2) # (ignored) a = Values(1,2) # a=Values(1,2) def yieldSingle yield 1 end yieldSingle {|a,b| } # error / a=1, b=nil (not decided yet) yieldSingle {|a, | } # a=1 yieldSingle {|a,*| } # a=1 yieldSingle {|*a| } # a=[1] yieldSingle {|a| } # a=1 def yieldValues yield 1,2 end yieldValues {|a,b| } # a=1, b=2 yieldValues {|a, | } # error / a=1 (not decided yet) yieldValues {|a,*| } # a=1 yieldValues {|*a| } # a=[1,2] yieldValues {|a| } # error [Block Parameters] * Allows Proc#call to take a block. def m(&block) block.call { p "OK" } end m {|&b| b.call } #=> "OK" [Keyword Arguments] * Syntax def m(a, b=nil, *rest, c:val, **krest) p a #=> 1 p b #=> 2 p rest #=> [3, 4, 44, 444] p c #=> 55 p krest #=> {:d => 66, :e => 77, :f => 88} end array = [4, 44, 444] hash = {e: 77, f: 88} m(1, 2, 3, *array, c:55, d:66, **hash) * Lambda blocks MIGHT accept keyword arguments. (makes `lambda' a reserved word?) -- Minero Aoki ruby-dev summary index: http://i.loveruby.net/en/ruby-dev-summary.html