[#74190] [Ruby trunk Feature#12134] Comparison between `true` and `false` — duerst@...
Issue #12134 has been updated by Martin D端rst.
3 messages
2016/03/07
[#74269] Type systems for Ruby — Rob Blanco <ml@...>
Dear ruby-core,
5 messages
2016/03/10
[#74395] [Ruby trunk Feature#12142] Hash tables with open addressing — shyouhei@...
Issue #12142 has been updated by Shyouhei Urabe.
3 messages
2016/03/17
[ruby-core:74322] [Ruby trunk Bug#12073][Closed] local variable interferes with keyword arguments
From:
nobu@...
Date:
2016-03-15 03:16:31 UTC
List:
ruby-core #74322
Issue #12073 has been updated by Nobuyoshi Nakada. Description updated Status changed from Open to Closed Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED Sean Linsley wrote: > This is also an issue with array destructuring: You are warned. ``` $ ruby -w -e 'def a(*b); b; end' -e 'a=[1,2,3]' -e 'a *a' -e:3: warning: `*' after local variable or literal is interpreted as binary operator -e:3: warning: even though it seems like argument prefix -e:3: warning: possibly useless use of * in void context -e:3:in `*': no implicit conversion of Array into Integer (TypeError) from -e:3:in `<main>' ``` ---------------------------------------- Bug #12073: local variable interferes with keyword arguments https://bugs.ruby-lang.org/issues/12073#change-57442 * Author: Josh Cheek * Status: Closed * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin13] * Backport: 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED ---------------------------------------- This code causes a syntax error: ~~~ruby def a(b:) b end a = 1 a b: 9 # !> program.rb:5: syntax error, unexpected ':', expecting end-of-input # !> a b: (9) # !> ^ ~~~ However, if we remove the local assignment it works ~~~ruby def a(b:) b end a b: 9 # => 9 ~~~ Or if we use parentheses it works ~~~ruby def a(b:) b end a = 1 a(b: 9) # => 9 ~~~ Or if we use non-keyword arguments it works ~~~ruby def a(b) b end a = 1 a 9 # => 9 ~~~ -- 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>