Created
April 12, 2015 11:59
-
-
Save yous/b0062b85cbbc37732a9c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class String | |
def to_s | |
'String' | |
end | |
end | |
class Fixnum | |
def to_s | |
'Fixnum' | |
end | |
end | |
def greeting(name) | |
puts "Hello, #{name}!" | |
end | |
greeting('John Doe') | |
# => Hello, John Doe! | |
greeting(42) | |
# => Hello, Fixnum! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment