Skip to content

Instantly share code, notes, and snippets.

@sorah sorah/foooo.rb forked from raa0121/foooo.rb
Created Jul 7, 2012

Embed
What would you like to do?
FooooScriptインタプリタっぽいもの
#/usr/bin/env ruby
# coding: utf-8
# ^ coding: is correct
def foooo
File.open(ARGV[0]){|f|
f.each do |line|
# Don't use "unless-else-end"
if /fo+/i =~ line
print "foooo"
else
# should be abort?
abort "Error"
end
end
puts # use puts with no argument to return
}
end
foooo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.