[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>

Dear Ruby developers and users!

8 messages 2009/04/17

[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>

Feature #1408: 0.1.to_r not equal to (1/10)

19 messages 2009/04/26

[ruby-core:23190] [Bug #1376] inline symbols/fixnums in a case expression do not honor an overwritten #=== method

From: Laurent Sansonetti <redmine@...>
Date: 2009-04-13 05:45:44 UTC
List: ruby-core #23190
Bug #1376: inline symbols/fixnums in a case expression do not honor an overwritten #=== method
http://redmine.ruby-lang.org/issues/show/1376

Author: Laurent Sansonetti
Status: Open, Priority: Normal
Category: core, Target version: 1.9.1
ruby -v: ruby 1.9.1 (2008-12-28 patchlevel-5000 trunk 21107) [i386-darwin9.5.0]

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.


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next