Ruby 1.9 fixes: use ruby -I in Makefile and workaround clash with 1.9 builtin Complex numbers in the operator example.
This commit is contained in:
parent
9f95e30650
commit
205d50a8c9
2 changed files with 4 additions and 4 deletions
|
|
@ -3,8 +3,8 @@ require 'example'
|
|||
|
||||
include Example
|
||||
|
||||
a = Complex.new(2, 3)
|
||||
b = Complex.new(-5, 10)
|
||||
a = Example::Complex.new(2, 3)
|
||||
b = Example::Complex.new(-5, 10)
|
||||
|
||||
puts "a = #{a}"
|
||||
puts "b = #{b}"
|
||||
|
|
@ -15,7 +15,7 @@ puts "a*b = #{a*b}"
|
|||
puts "a-c = #{a-c}"
|
||||
|
||||
# This should invoke Complex's copy constructor
|
||||
e = Complex.new(a-c)
|
||||
e = Example::Complex.new(a-c)
|
||||
e = a - c
|
||||
puts "e = #{e}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue