[#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:23228] [Bug #1385] Wonderful undocumented feature in Ruby 1.8.7 & 1.9

From: Marc-Andre Lafortune <redmine@...>
Date: 2009-04-17 05:00:16 UTC
List: ruby-core #23228
Issue #1385 has been updated by Marc-Andre Lafortune.


As pointed out by Joel VanderWerf, my second usage example is wrong (it takes commas instead of =>). It should read:

/*
 *  call-seq:
 *     Hash[ key, value, ... ]   => hash
 *     Hash[ [ [key, value], ... ] ]   => hash
 *     Hash[ object ]   => hash
 *
 *  Creates a new hash populated with the given objects. Equivalent to
 *  the literal <code>{ <i>key</i> => <i>value</i>, ... }</code>. In the first
 *  form, keys and values occur in pairs, so there must be an even number of arguments.
 *  The second and third form take a single argument which is either
 *  an array of key-value pairs or an object convertible to a hash.
 *
 *     Hash["a", 100, "b", 200]             #=> {"a"=>100, "b"=>200}
 *     Hash[ [ ["a", 100], ["b", 200] ] ]   #=> {"a"=>100, "b"=>200}
 *     Hash["a" => 100, "b" => 200]         #=> {"a"=>100, "b"=>200}
 *     {"a" => 100, "b" => 200}             #=> {"a"=>100, "b"=>200}
 */

Sorry!

----------------------------------------
http://redmine.ruby-lang.org/issues/show/1385

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

In This Thread

Prev Next