Created
August 23, 2009 22:03
-
-
Save ujihisa/173478 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby192 | |
def try(it) | |
puts "# '#{it}' in four rubies" | |
puts | |
{ | |
"1.9.2'" => 'ruby192', | |
"1.9.1" => 'ruby191', | |
"1.8.7" => '/opt/local/bin/ruby', | |
"1.8.6" => '/usr/bin/ruby' | |
}.each do |k, v| | |
system "#{v} -e 'p(#{it})' >& tmptmptmp.txt" | |
puts "## in #{k}" | |
puts File.read "tmptmptmp.txt" | |
end | |
end | |
DATA.each_line {|l| | |
try(l.chomp) | |
puts | |
} | |
__END__ | |
{} | |
{1 => 2} | |
{1} | |
{|x| 1 } | |
{ p 1 => 2 } | |
{ p(1) => 2 } | |
{ p(1 => 2) } | |
{ p {} => {} } | |
{p:p} | |
{ p, p = 1, 2, 3 } | |
p { 1 } | |
p({ 1 }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment