[#82706] [Ruby trunk Bug#13851] getting "can't modify string; temporarily locked" on non-frozen instances — cardoso_tiago@...
Issue #13851 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/07
[#82853] [Ruby trunk Bug#13916] Race condition when sending a signal to a new fork — russell.davis@...
Issue #13916 has been reported by russelldavis (Russell Davis).
3 messages
2017/09/19
[#82892] [Ruby trunk Bug#13921] buffered read_nonblock doesn't work as expected using SSLSocket — cardoso_tiago@...
Issue #13921 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/20
[ruby-core:82961] [Ruby trunk Bug#13937] ARGV doesn't behave like an array
From:
lucascaton@...
Date:
2017-09-25 03:29:58 UTC
List:
ruby-core #82961
Issue #13937 has been reported by lucascaton (Lucas Caton). ---------------------------------------- Bug #13937: ARGV doesn't behave like an array https://bugs.ruby-lang.org/issues/13937 * Author: lucascaton (Lucas Caton) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16] * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- Ruby allows us to access an array item by passing its index, regardless if there is or not a space between the array and the [] with the index. Ie.: both of the following lines work: ~~~ ruby [][0] # nil [] [0] # nil ~~~ **ARGV** is an array as well. However, it doesn't work when we add a space to access some index: ~~~ ruby ARGV # [] ARGV.class # Array ARGV == [] # true ARGV[0] # nil ARGV [0] # NoMethodError: undefined method `ARGV' for main:Object ~~~ The last line should've returned **nil**. Ps.: Same happens when you call a file with arguments by running **$ ruby file.rb foo bar**. **ARGV [0]** will also raise an exception. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>