psych
psych copied to clipboard
A libyaml wrapper for Ruby
I am getting the following when attempting to run rspec: /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/psych-2.0.1/lib/psych/stream.rb:35:in `': uninitialized constant Psych::Streaming::ClassMethods (NameError) from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/psych-2.0.1/lib/psych/stream.rb:23:in`module:Psych' from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/psych-2.0.1/lib/psych/stream.rb:1:in `' from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/psych-2.0.1/lib/psych.rb:13:in`require' from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/psych-2.0.1/lib/psych.rb:13:in `' from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/activesupport-3.2.12/lib/active_support/ordered_hash.rb:2:in`require' from /Users/gb/.rvm/gems/ruby-1.9.3-p125@togo/gems/activesupport-3.2.12/lib/active_support/ordered_hash.rb:2:in...
Here is a script to illustrate the difference in timing between `load_file` under Psych and under Syck. It is simple-minded but is very illustrative of my actual use case. The...
When subclassing string, the deserialized object loses the encoding. This is just the test, I really don't know where to fix this. Would be happy to do it if someone...
The exception in @dispatch_cache's default value has an error( `target` is not a thing; raises "undefined local variable or method `target' for... "). This fixes that. (Also, the other exceptions...
Anchors should be emitted in ascending order.
Do so by always interpreting mapping keys in an object as symbols rather than strings. When interpreted as a string it becomes `nil` which is then coerced to a string...
Parse errors from `YAML.load_file` will include the filename, which is useful in case you're e.g. parsing a number of configuration files: ``` ruby File.write('/tmp/file.yaml', "\tfoo:"); YAML.load_file('/tmp/file.yaml') #=> Psych::SyntaxError: (/tmp/file.yaml): found...
Example gist: https://gist.github.com/3034085 This is inconvenient by itself, but can also cause unexpected problems when moving code between environments that use Syck and Psych. When the Syck parser loads YAML...
Under Syck if you register a domain type, the block will get the tag name and the value yielded to it as they are in the actual raw YAML. In...
I'm not sure if this is a bug or changed behavior, perhaps I could get some clarification or resolution via this issue: colon-delimited strings of integers are parsed by **YAML**...