Project

General

Profile

Actions

Backport #3405

closed

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

Added by sergeych (Sergey Chernov) almost 14 years ago. Updated almost 5 years ago.

Status:
Closed
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

Actions #1

Updated by jeremyevans0 (Jeremy Evans) almost 5 years ago

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

Also available in: Atom PDF

Like0
Like0