psych icon indicating copy to clipboard operation
psych copied to clipboard

A libyaml wrapper for Ruby

Results 138 psych issues
Sort by recently updated
recently updated
newest added

Over in https://github.com/dependabot/dependabot-core/issues/5453 a user reported a parsing difficulty with the following example YAML file: ``` env: DISPLAY: :99 ``` So I tried parsing it: ```ruby irb(main):002:0> s = Psych.safe_load('env:\n...

This could just me, but I really lost and I don't understand why this works this way. I have a big YAML with various string values. One of them is...

Bear with me here - I'm not sure if this is a bug in Psych or I'm just misunderstanding the spec. If you try and serialise a string that looks...

I have Rails I18n `en.yml` file which contains values with or without qoutes. I want to change this file programmatically, but if I use `Psych#load` and `Psych#dump` approach it removes...

I have a Dockerfile where I want to setup my environment. Therefore I have to install some gems. When installing psych it crashes with the error: **No such file or...

```ruby string = "2023-12-30\t23:16:25" Psych.dump(string) /.rbenv/versions/3.2.2/lib/ruby/3.2.0/psych/scalar_scanner.rb:120:in `parse_time': undefined method `match' for nil:NilClass (NoMethodError) md = time.match(/(\d+:\d+:\d+)(?:\.(\d*))?\s*(Z|[-+]\d+(:\d\d)?)?/) ``` Happens because `\s` is used in `TIME` regex, and space is used when...

See original issue at jruby/jruby#8352. The following YAML fails to parse in SnakeYAML-Engine, used by the JRuby Psych extension: ```yaml --- &1 !ruby/object:Set hash: :one: true :two: true *1: true...

Hi, everytime i reload! the rails console i get this error: ``` irb(main):008> reload! Reloading... (irb):8:in `': undefined method `end_line=' for nil (NoMethodError) node.end_line = @end_line ^^^^^^^^^^^^^ irb(main):009> ``` it...

Would it be possible to alias YAML[] onto YAML.load_file()? E. g.: x = YAML.load_file('foobar.yml') x = YAML['foobar.yml'] Rationale: Laziness (or "user efficiency" - anything to type less, just as require...

Timestamps for which Time.new raises an ArgumentError are not quoted by `YAML.safe_dump` (and `YAML.dump` - same result), leading to `Psych::DisallowedClass` when trying to load them. A valid timestamp works fine...