Project

General

Profile

Backport #3405

overriding === on String causes exception when used with constants

Added by sergeych (Sergey Chernov) about 9 years ago. Updated 6 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
[ruby-core:30637]

Description

=begin
~$ 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 <main>': method===' called on terminated object (0x000001008f9ba8) (NotImplementedError)

MacOs 10.6, ruby was build from sources as 64bit application
=end

History

#1

Updated by jeremyevans0 (Jeremy Evans) 6 days ago

  • Status changed from Open to Closed
  • Description updated (diff)

Also available in: Atom PDF