Last active
August 29, 2015 14:14
-
-
Save cdlm/4f90f67ce0fadd40f946 to your computer and use it in GitHub Desktop.
Psych loading WTF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gem list psych | |
*** LOCAL GEMS *** | |
psych (2.0.8) | |
$ ruby -r yaml -e 'puts Psych.methods.include?(:load_file)' | |
true | |
$ pry -r yaml | |
[1] pry(main)> Psych.load_file | |
ArgumentError: wrong number of arguments (0 for 1) | |
from /Users/damien/.rbenv/versions/2.2.0/lib/ruby/2.2.0/psych.rb:463:in `load_file' | |
[2] pry(main)> Psych::load_file | |
ArgumentError: wrong number of arguments (0 for 1) | |
from /Users/damien/.rbenv/versions/2.2.0/lib/ruby/2.2.0/psych.rb:463:in `load_file' | |
[3] pry(main)> | |
### | |
### Now let's gem update... | |
### | |
$ gem install psych | |
Fetching: psych-2.0.12.gem (100%) | |
Building native extensions. This could take a while... | |
Successfully installed psych-2.0.12 | |
1 gem installed | |
$ gem list psych | |
*** LOCAL GEMS *** | |
psych (2.0.12, 2.0.8) | |
$ ruby -r yaml -e 'puts Psych.methods.include?(:load_file)' | |
true | |
$ pry -r yaml | |
[1] pry(main)> Psych.load_file | |
NoMethodError: undefined method `load_file' for Psych:Module | |
from (pry):1:in `__pry__' | |
[2] pry(main)> Psych::load_file | |
NoMethodError: undefined method `load_file' for Psych:Module | |
from (pry):2:in `__pry__' | |
[3] pry(main)> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is with Ruby 2.2.0 under rbenv 0.4.0