Comments (3)
This should have been fixed in Psych 1.2.1. Can you try on Ruby 1.9.3? The current exception should look something like this:
irb(main):003:0> require 'psych'
=> true
irb(main):004:0> Psych.load "foo:
irb(main):005:0" <<: *bar"
Psych::BadAlias: Unknown alias: bar
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:208:in `block in visit_Psych_Nodes_Alias'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:208:in `fetch'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:208:in `visit_Psych_Nodes_Alias'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/visitor.rb:15:in `visit'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/visitor.rb:5:in `accept'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:20:in `accept'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:226:in `block in revive_hash'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:220:in `each'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:220:in `each_slice'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:220:in `revive_hash'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:128:in `visit_Psych_Nodes_Mapping'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/visitor.rb:15:in `visit'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/visitor.rb:5:in `accept'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:20:in `accept'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:235:in `block in revive_hash'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:220:in `each'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:220:in `each_slice'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:220:in `revive_hash'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:128:in `visit_Psych_Nodes_Mapping'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/visitor.rb:15:in `visit'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/visitor.rb:5:in `accept'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:20:in `accept'
from /Users/aaron/.local/lib/ruby/1.9.1/psych/nodes/node.rb:35:in `to_ruby'
from /Users/aaron/.local/lib/ruby/1.9.1/psych.rb:127:in `load'
from (irb):4
from /Users/aaron/.local/bin/irb:12:in `<main>'irb(main):006:0>
from psych.
This doesn't seem to be fixed for me :
irb(main):001:0> RUBY_VERSION
=> "1.9.3"
irb(main):002:0> require 'psych'
=> true
irb(main):003:0> Psych::VERSION
=> "1.2.1"
irb(main):004:0> Psych.load "foo:
irb(main):005:0" <<: *bar"
TypeError: can't convert nil into Hash
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:217:in `merge!'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:217:in `block in revive_hash'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:in `each'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:in `each_slice'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:in `revive_hash'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:123:in `visit_Psych_Nodes_Mapping'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/visitor.rb:15:in `visit'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/visitor.rb:5:in `accept'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:226:in `block in revive_hash'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:in `each'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:in `each_slice'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:in `revive_hash'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:123:in `visit_Psych_Nodes_Mapping'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/visitor.rb:15:in `visit'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/visitor.rb:5:in `accept'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/nodes/node.rb:35:in `to_ruby'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:113:in `load'
from (irb):4
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `<main>'irb(main):006:0>
from psych.
Make sure you do:
gem 'psych'
before you require it, or use edge 1.9.3
Aaron Patterson
http://tenderlovemaking.com/
On Dec 20, 2011, at 12:25 PM, Christopher [email protected] wrote:
This doesn't seem to be fixed for me :
irb(main):001:0> RUBY_VERSION
'irb(main):006:0>
=> "1.9.3"
irb(main):002:0> require 'psych'
=> true
irb(main):003:0> Psych::VERSION
=> "1.2.1"
irb(main):004:0> Psych.load "foo:
irb(main):005:0" <<: *bar"
TypeError: can't convert nil into Hash
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:217:inmerge!' from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:217:in
block in revive_hash'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:ineach' from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:in
each_slice'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:inrevive_hash' from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:123:in
visit_Psych_Nodes_Mapping'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/visitor.rb:15:invisit' from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/visitor.rb:5:in
accept'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:inaccept' from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:226:in
block in revive_hash'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:ineach' from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:in
each_slice'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:211:inrevive_hash' from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:123:in
visit_Psych_Nodes_Mapping'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/visitor.rb:15:invisit' from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/visitor.rb:5:in
accept'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:inaccept' from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych/nodes/node.rb:35:in
to_ruby'
from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/psych.rb:113:inload' from (irb):4 from /Users/chris/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in
Reply to this email directly or view it on GitHub:
#41 (comment)
from psych.
Related Issues (20)
- Error loading Psych gem specification on Ruby 3.2.2 HOT 1
- YAML string in exponential format cannot be loaded by YAML 1.2 parser
- Psych::BadAlias error with simple alias HOT 1
- Version 4.0.5 breaks Date deserialization HOT 1
- JSON is invalid
- Dates with five digit years throw exception HOT 1
- Prevent snakeYAML add backslash when dump multiple line string HOT 1
- YAML.dump(date) generates warnings with Rails 7.0.7+ HOT 1
- [DOC] Link fragment does not work
- YAML 1.2 compliance possibly breaking VCR HOT 3
- Add settings for alias limits, recursion, and duplicate keys HOT 8
- TypeError: allocator undefined for Nokogiri::HTML5::Document on YAML.unsafe_load_file HOT 3
- Psych 5.1.1 fails to load on JRuby 9.x HOT 10
- Singleton Classes Aren't round-trippable
- Issue between psych and mini_racer on platform x86_64-linux HOT 1
- Psych::DisallowedClass when loading fixtures HOT 3
- Strange `FrozenError` on `Psych.load` HOT 1
- Kernel.y interferes with code relying on method_missing HOT 3
- SSL issues preventing installation HOT 1
- yaml parsing is wrong when key's value has leading colon HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psych.