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
|
|
@ -970,7 +970,7 @@ ruby_cpp_static: $(SRCS)
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
ruby_run:
|
ruby_run:
|
||||||
$(RUNTOOL) $(RUBY) $(RUBY_SCRIPT) $(RUNPIPE)
|
$(RUNTOOL) $(RUBY) -I. $(RUBY_SCRIPT) $(RUNPIPE)
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# Version display
|
# Version display
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@ require 'example'
|
||||||
|
|
||||||
include Example
|
include Example
|
||||||
|
|
||||||
a = Complex.new(2, 3)
|
a = Example::Complex.new(2, 3)
|
||||||
b = Complex.new(-5, 10)
|
b = Example::Complex.new(-5, 10)
|
||||||
|
|
||||||
puts "a = #{a}"
|
puts "a = #{a}"
|
||||||
puts "b = #{b}"
|
puts "b = #{b}"
|
||||||
|
|
@ -15,7 +15,7 @@ puts "a*b = #{a*b}"
|
||||||
puts "a-c = #{a-c}"
|
puts "a-c = #{a-c}"
|
||||||
|
|
||||||
# This should invoke Complex's copy constructor
|
# This should invoke Complex's copy constructor
|
||||||
e = Complex.new(a-c)
|
e = Example::Complex.new(a-c)
|
||||||
e = a - c
|
e = a - c
|
||||||
puts "e = #{e}"
|
puts "e = #{e}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue