⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (348 Bytes)
Bug #1982
ยป helloworld.rb
johan556 (Johan Holmberg)
, 08/23/2009 05:32 AM
#
# Demonstrates scope problem in Ruby 1.9.
# Can be run like this:
#
# $ ruby1.8 -e 'load "helloworld.rb", true' # OK
# $ ruby1.9 -e 'load "helloworld.rb", true' # gives error
#
class
Hello
def
say
;
puts
"Hello"
;
end
end
class
HelloWorld
def
say
Hello
.
new
.
say
;
puts
"World"
end
end
HelloWorld
.
new
.
say
(1-1/1)
Loading...