pjb3 (owner)

Revisions

gist: 147707 Download_button fork
public
Public Clone URL: git://gist.github.com/147707.git
Embed All Files: show embed
ignore_block_args.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
def run_block
  yield(1,2,3,4)
end
 
run_block do |x,|
  puts "#{x} is the loneliest number"
end
 
run_block do |x,y|
  puts "#{x}, #{y}, You know what to do"
end
 
run_block do |x,y,z|
  puts "#{x}, #{y}, #{z}, Shoot!"
end
 
run_block do |x,y,z,a,b|
  puts "#{x}, #{y}, #{z}, #{a}, Let's see if you've got some more!"
end
 
# 1 is the loneliest number
# 1, 2, You know what to do
# 1, 2, 3, Shoot!
# 1, 2, 3, 4, Let's see if you've got some more!