Ruby 初心者スレッド Part 24
■ このスレッドは過去ログ倉庫に格納されています
0057デフォルトの名無しさん
2009/01/05(月) 09:06:48> It fails to execute "require 'rubygems/defaults/operating_system'"
Humm....
Ignoring this exception is no problem?
> > Exception `NoMethodError' at c:/ruby/lib/ruby/1.8/rational.rb:78
> > - undefined method `gcd' for Rational(1, 2):Rational
> You might execute a code like Rational(1, 2).gcd,
> but the Rational class does not have a method named gcd.
I found "Rational::gcd" in rational.rb ...
But, the error has occurred. This is why?
sample code is here.
----cut here----
#!ruby -Ku
puts "hello"
----cut here----
Run command "ruby -d foobar.rb" to confirm.
■ このスレッドは過去ログ倉庫に格納されています