Ruby 初心者スレッド Part 24at TECH
Ruby 初心者スレッド Part 24 - 暇つぶし2ch57:デフォルトの名無しさん
09/01/05 09:06:48
>>54
> 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.


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch