⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Backport191
All Projects
Ruby
»
Backport191
Overview
Activity
Issues
Like
Download (277 Bytes)
Backport #5807
ยป bad.rb
An example where things don't work. -
silvioricardoc (Silvio Cordeiro)
, 12/26/2011 03:28 AM
#! /usr/bin/ruby -w
def
foo1
puts
"foo1 called"
end
class
<<
self
define_method
(
:foo2
)
do
puts
"foo2 called"
end
end
def
call_foos
foo1
foo2
end
class
Bad
def
initialize
call_foos
end
end
call_foos
# calls foo1, foo2
Bad
.
new
# calls foo1, foo2
(1-1/1)
Loading...