Skip to content

Instantly share code, notes, and snippets.

@fcamel
Created April 23, 2017 01:26
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 fcamel/ede0e2df1fb6cb4b332249dc2366d868 to your computer and use it in GitHub Desktop.
Save fcamel/ede0e2df1fb6cb4b332249dc2366d868 to your computer and use it in GitHub Desktop.
$ cat a.rb
class A
def foo
return "foo"
end
end
a = A.new
print a.foo(), "\n"
class A
def foo
return "bar"
end
end
print a.foo(), "\n"
$ ruby a.rb
foo
bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment