General

Profile

faraz (Faraz Yashar)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 2 2

Activity

03/20/2017

06:36 PM Ruby Bug #13337 (Closed): Eval and Later Defined Local Variables
I've noticed the following behavior with eval:
~~~ ruby
def example
eval("foo") # => nil, but would expect a NameError
eval("bar") # => NameError
foo = 1
end
~~~
I'm assuming this behavior is expected, since "eval" exec...
faraz (Faraz Yashar)

05/16/2015

08:06 AM Ruby Bug #11156: Indeterminate Behavior for Curly-braced Blocks with Function Argument Missing Parenthesis
I'm trying to demonstrate that the syntax is very confusing and error-prone, especially given that `do ... end` blocks do not behave similarly due to precedence differences.
Consider the `travel_to` time travel method given by Rails' ...
faraz (Faraz Yashar)

05/15/2015

10:49 PM Ruby Bug #11156 (Rejected): Indeterminate Behavior for Curly-braced Blocks with Function Argument Missing Parenthesis
Given a function that takes an argument and a block, the behavior wildly varies when parenthesis are omitted from the functions argument.
Consider the following function:
~~~ruby
require 'time'
def example(arg)
puts arg
i...
faraz (Faraz Yashar)

Also available in: Atom