Skip to content

Instantly share code, notes, and snippets.

@kaichen
Created September 28, 2011 04:46
Show Gist options
  • Select an option

  • Save kaichen/1247010 to your computer and use it in GitHub Desktop.

Select an option

Save kaichen/1247010 to your computer and use it in GitHub Desktop.
Odd behavior here.
‹ruby-1.9.3@devel› $ irb
ruby-1.9.3-preview1 :001 > YAML
=> YAML
ruby-1.9.3-preview1 :002 > YAML.method(:load)
=> #<Method: Module(Kernel)#load>
ruby-1.9.3-preview1 :003 > YAML.load "--- hello world!"
NoMethodError: private method `load' called for YAML:Module
from (irb):3
from /Users/kaichen/.rvm/rubies/ruby-1.9.3-preview1/bin/irb:16:in `<main>'
ruby-1.9.3-preview1 :004 > require 'yaml'
=> true
ruby-1.9.3-preview1 :005 > YAML.method(:load)
=> #<Method: Psych.load>
ruby-1.9.3-preview1 :006 > YAML.method(:load).source_location
=> ["/Users/kaichen/.rvm/rubies/ruby-1.9.3-preview1/lib/ruby/1.9.1/psych.rb", 111]
ruby-1.9.3-preview1 :007 > YAML.load "--- hello world!"
=> "hello world!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment