Skip to content

Instantly share code, notes, and snippets.

@ujihisa
Created July 5, 2010 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ujihisa/463974 to your computer and use it in GitHub Desktop.
Save ujihisa/463974 to your computer and use it in GitHub Desktop.
How do you write the semantically equivalent code in your favorite programming language?
if ARGV.shift == 'ujihisa'
class Ujihisa
def hi
'my name is ujihisa'
end
end
def the_klass
Ujihisa
end
else
class Ujm
def hi
'this is a pen'
end
end
def the_klass
Ujm
end
end
# main
p the_klass.new.hi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment