Skip to content

Instantly share code, notes, and snippets.

@tmaeda
Created February 14, 2011 10:43
Show Gist options
  • Save tmaeda/825717 to your computer and use it in GitHub Desktop.
Save tmaeda/825717 to your computer and use it in GitHub Desktop.
なぜyamlをrequireしただけで、Rationalの例外があがるんだろう?
bash-3.2$ ruby -v -r yaml -e ""
ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10.6.0]
bash-3.2$ ruby -d -v -r yaml -e ""
ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-darwin10.6.0]
Exception `NoMethodError' at /Users/tmaeda/.rvm/rubies/ruby-1.8.7-p330/lib/ruby/1.8/rational.rb:78 - undefined method `gcd' for Rational(1, 2):Rational
bash-3.2$ ruby -d -v -r yaml -e ""
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0]
Exception `NameError' at /Users/tmaeda/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/syck/tag.rb:81 - method `yaml_as' not defined in Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment