[#85940] [Ruby trunk Bug#14578] Forking a child process inside of a mutex crashes the ruby interpreter — ben.govero@...
Issue #14578 has been reported by bengovero (Ben Govero).
3 messages
2018/03/05
[#86205] [Ruby trunk Feature#14618] Add display width method to String for CLI — aycabta@...
Issue #14618 has been reported by aycabta (aycabta .).
3 messages
2018/03/19
[#86366] Re: [ruby-cvs:70102] usa:r63008 (trunk): get rid of test error/failure on Windows introduced at r62955 — Eric Wong <normalperson@...>
usa@ruby-lang.org wrote:
3 messages
2018/03/28
[ruby-core:86166] [Ruby trunk Bug#14611] Exotic method parameters bug
From:
shevegen@...
Date:
2018-03-17 04:08:16 UTC
List:
ruby-core #86166
Issue #14611 has been updated by shevegen (Robert A. Heiler).
I did not know that either.
I guess the problem was that bogdan was using variables with
a leading '_'.
With this:
def x(a,a,b)
puts 'HI'
end
I get in IRB:
SyntaxError ((irb):1: duplicated argument name
With that, however had:
def x(_a,_a,_b)
puts 'hi'
end
x(1,2,3)
# => hi
I get no error and the method call works.
I have no idea if this is a bug or a feature but to me,
just from looking at the above, I would have assumed that
_a is equal to _a just as a was equal (considered) above.
----------------------------------------
Bug #14611: Exotic method parameters bug
https://bugs.ruby-lang.org/issues/14611#change-71050
* Author: bogdan (Bogdan Gusiev)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: 2.4.2
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Consider the following code:
~~~ ruby
def test(_, x, *_)
x
end
test(1,2,3) # => nil
~~~
By some reason second parameter is nil when the rest of parameters declared as not used.
--
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>