[#66678] [ruby-trunk - Feature #10481] Add "if" and "unless" clauses to rescue statements — alex@...
Issue #10481 has been updated by Alex Boyd.
3 messages
2014/12/04
[#66762] Re: [ruby-changes:36667] normal:r48748 (trunk): struct: avoid all O(n) behavior on access — Tanaka Akira <akr@...>
2014-12-10 0:44 GMT+09:00 normal <ko1@atdot.net>:
3 messages
2014/12/10
[#66851] [ruby-trunk - Feature #10585] struct: speedup struct.attr = v for first 10 attributes and struct[:attr] for big structs — funny.falcon@...
Issue #10585 has been updated by Yura Sokolov.
3 messages
2014/12/15
[#67126] Ruby 2.2.0 Released — "NARUSE, Yui" <naruse@...>
We are pleased to announce the release of Ruby 2.2.0.
8 messages
2014/12/25
[#67128] Re: Ruby 2.2.0 Released
— Rodrigo Rosenfeld Rosas <rr.rosas@...>
2014/12/25
I can't install it in any of our Ubuntu servers using rbenv:
[#67129] Re: Ruby 2.2.0 Released
— SHIBATA Hiroshi <shibata.hiroshi@...>
2014/12/25
> I can't install it in any of our Ubuntu servers using rbenv:
[ruby-core:66718] [ruby-trunk - Feature #10571] Keyword arguments with local variable
From:
matz@...
Date:
2014-12-05 06:06:38 UTC
List:
ruby-core #66718
Issue #10571 has been updated by Yukihiro Matsumoto.
`var` is a local variable in the class scope, which cannot be accessed from the method. a method has independent scope.
Matz.
----------------------------------------
Feature #10571: Keyword arguments with local variable
https://bugs.ruby-lang.org/issues/10571#change-50316
* Author: gogo tanaka
* Status: Open
* Priority: Low
* Assignee:
* Category:
* Target version:
----------------------------------------
It's kind of curiosity. As far as I searched, I couldn't get sensible reason.
Please give me information if you have free time.
```ruby
class MyClass
var = 'test'
def my_method(kwd_var: var)
p kwd_var
end
end
MyClass.new.my_method
#=> NameError: undefined local variable or method `var' for #<MyClass:0x007f91520a15c8>
```
I've expected above code is same as below code.
```ruby
class MyClass
def my_method(kwd_var: 'test')
p kwd_var
end
end
MyClass.new.my_method
#=> "test"
```
Take your time. Thanks.
--
https://bugs.ruby-lang.org/