Actions
Bug #1376
closedinline symbols/fixnums in a case expression do not honor an overwritten #=== method
ruby -v:
ruby 1.9.1 (2008-12-28 patchlevel-5000 trunk 21107) [i386-darwin9.5.0]
Backport:
Description
=begin
The case expression in Ruby 1.9 does not seem to honor the fact that Symbol#=== could have been overwritten prior to the expression.
An example with both Ruby 1.8 and Ruby 1.9:
$ ruby -e "class Symbol; def ===(o); p 42; true; end; end; case :foo; when :foo; end"
42
$ ruby19 -e "class Symbol; def ===(o); p 42; true; end; end; case :foo; when :foo; end"
$
The same problem seems to exist with fixnums as well.
=end
Actions
Like0
Like0Like0Like0Like0Like0