From: Sergey Chernov Date: 2010-06-08T00:45:26+09:00 Subject: [ruby-core:30637] [Bug #3405] overriding === on String causes exception when used with constants Bug #3405: overriding === on String causes exception when used with constants http://redmine.ruby-lang.org/issues/show/3405 Author: Sergey Chernov Status: Open, Priority: Normal Category: core ruby -v: ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.2.0] ~$ cat bug_===.rb p RUBY_VERSION class String def === x x == self end end case '1' when '1' p 'has one' end ~$ ruby bug_===.rb "1.9.1" bug_===.rb:9:in `
': method `===' called on terminated object (0x000001008f9ba8) (NotImplementedError) MacOs 10.6, ruby was build from sources as 64bit application ---------------------------------------- http://redmine.ruby-lang.org