[MacRuby-devel] [MacRuby] #792: Hash#delete is broken.
MacRuby
ruby-noreply at macosforge.org
Thu Jul 15 00:26:04 PDT 2010
#792: Hash#delete is broken.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Test Script:
{{{
$ cat test_hash.rb
h = { 1 => 'one', 2 => 'two', 3 => 'three',
self => 'self', true => 'true', nil => 'nil',
'nil' => nil }
h.each do |k, v|
p "#{k} : #{v}"
p h.delete(k)
end
p "Result: #{h}"
}}}
Result of Ruby 1.9.1:
{{{
$ ruby test_hash.rb
"1 : one"
"one"
"2 : two"
"two"
"3 : three"
"three"
"main : self"
"self"
"true : true"
"true"
" : nil"
"nil"
"nil : "
nil
"Result: {}"
}}}
Result of MacRuby Trunk:
{{{
$ macruby test_hash.rb
"1 : one"
"one"
"false : false"
nil
"Result: {2=>\"two\", 3=>\"three\", main=>\"self\", true=>\"true\",
nil=>\"nil\", \"nil\"=>nil}"
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/792>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list