eiko (eiko kokuma)
- Login: eiko
- Registered on: 05/04/2017
- Last sign in: 05/04/2017
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
05/05/2017
-
02:16 PM Ruby Bug #13543: local variable declaration
- true, the parser detects the local variable early on, but it does not ignore the method until the point of assignment:
~~~ ruby
def foo
@foo ||= "foo"
end
p local_variables #=> [:foo]
p foo.size #=> 3
foo = foo.size #=> ...
05/04/2017
-
06:08 PM Ruby Bug #13543 (Rejected): local variable declaration
- The following code snippet generates a strange error:
~~~ ruby
def foo
@foo ||= "foo"
end
foo = foo.size
#=> undefined method 'size' for nil:NilClass (NoMethodError)
~~~
I expect the code to create a local variable `foo...