4 ms·
# goal.rb module G def [](o=nil) o ? "g#{values[0].to_s}al" : ({ :n => values[0].to_s + "o" }.extend G) end end g = {}.extend G eval D
by morganhankins 12y ago
# goal.rb
module G
def [](o=nil)
o ? "g#{values[0].to_s}al" : ({ :n => values[0].to_s + "o" }.extend G)
end
end
g = {}.extend G
eval DATA.read.gsub("(", "[").gsub(")", "]")
__END__
gal = g('al')
p gal
goal = g()('al')
p goal
goooooooal = g()()()()()()()('al')
p goooooooal
# ruby goal.rb
# "gal"
# "goal"
# "goooooooal"
# https://gist.github.com/morganhankins/de13ee378907143a7789 https://gist.github.com/morganhankins/de13ee378907143a7789