Closed rixx closed 1 year ago
Perfect, thanks for the PR! :)
Hmmm, I didn't upgrade my Ruby install, and now I'm getting
$ nom p
+ exec ruby -I~/projects/nom/lib -- /home/rohieb/projects/nom/bin/nom p
Traceback (most recent call last):
5: from /home/rohieb/projects/nom/bin/nom:27:in `<main>'
4: from /home/rohieb/projects/nom/bin/nom:27:in `new'
3: from /home/rohieb/projects/nom/lib/nom/nom.rb:30:in `initialize'
2: from /home/rohieb/projects/nom/lib/nom/nom.rb:30:in `new'
1: from /home/rohieb/projects/nom/lib/nom/config.rb:10:in `initialize'
/usr/lib/ruby/2.7.0/psych.rb:576:in `load_file': unknown keyword: :permitted_classes (ArgumentError)
(the first line is my very trivial ~/bin/nom
wrapper, which runs with sh -x
shebang)
More info:
$ ruby --version
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu]
Does anyone know ruby well enough to find out what's wrong here?
I don't know Ruby well at all, and I'm sorry for any problems I've caused! It seems to me that 2.7.x is pretty old? Mine is on 3.0, and I think the 3.x update is what caused the problem. I suppose we'll need code to distinguish by version?
I updated my Ruby install today, and nom didn't run afterwards:
Apparently YAML loads require some classes to be whitelisted first. Fix tested by editing the installed file in-place, and everything works great again.