Project

General

Profile

This project is closed and read-only.

Actions

Backport #3405

closed

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

Backport #3405: overriding === on String causes exception when used with constants

Added by sergeych (Sergey Chernov) over 16 years ago. Updated about 7 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

Updated by jeremyevans0 (Jeremy Evans) about 7 years ago Actions #1

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

Also available in: PDF Atom