I'm trying to pass an array and a block to a function but am getting the following errors:
./rb:7: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
test( [0,1,2,3], {puts 'string'} )
                    ^
./rb:7: syntax error, unexpected '}', expecting end-of-input
test( [0,1,2,3], {puts 'string'} )
Code in question:
1 #!/usr/bin/env ruby
2 
3 def test(arr, &b)
4   b.call
5 end
6 
7 test( [0,1,2,3], {puts 'string'} )