[#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:23168] [Bug #1367] flatten(0) is not consistent with flatten(), flatten(1), etc.

From: Paul Lewis <redmine@...>
Date: 2009-04-08 23:01:11 UTC
List: ruby-core #23168
Bug #1367: flatten(0) is not consistent with flatten(), flatten(1), etc.
http://redmine.ruby-lang.org/issues/show/1367

Author: Paul Lewis
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.9.0 (2008-06-20 revision 17482) [i486-linux]

> a = [1, 2]
> a2 = a.flatten
> a2 << :a
> a2
=> [1, 2, :a]
> a
=> [1, 2]

> b = [3, 4]
> b2 = b.flatten 1
> b2 << :b
> b2
=> [3, 4, :b]
> b
=> [3, 4]

HOWEVER:

> c = [5, 6]
> c2 = c.flatten 0
> c2 << :c
> c2
=> [5, 6, :c]
> c
=> [5, 6, :c]  <-- Huh?  Should be [5, 6].


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

In This Thread

Prev Next