Project

General

Profile

Actions

Bug #5915

closed

Array#join with explicit nil should not use $,

Added by john_firebaugh (John Firebaugh) almost 13 years ago. Updated over 12 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]
Backport:
[ruby-core:42194]

Description

=begin
The documentation for Array#join says that the default argument is $,. But:

$, = ","
[1,2,3].join(nil) #=> "1,2,3"

Based on the documentation (and the POLS), I would expect "123".
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0