Project

General

Profile

Bug #11604 ยป error.rb

maciej.mensfeld (Maciej Mensfeld), 10/19/2015 03:18 PM

 
# Any of those will fail when ruby error.rb

print { while: 1 }
print { until: 1 }
print { if: 1 }
print { unless: 1 }

# Works when we assign this hash

hash = { while: 1 }

# But brakes when we use it as a method param

def run(*args)
p args
end

run(for: 1)
run { for: 1 }
    (1-1/1)