Project

General

Profile

Bug #11604 ยป error.rb

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

 
1
# Any of those will fail when ruby error.rb
2

    
3
print { while: 1 }
4
print { until: 1 }
5
print { if: 1 }
6
print { unless: 1 }
7

    
8
# Works when we assign this hash
9

    
10
hash = { while: 1 }
11

    
12
# But brakes when we use it as a method param
13

    
14
def run(*args)
15
  p args
16
end
17

    
18
run(for: 1)
19
run { for: 1 }