hjson-rb icon indicating copy to clipboard operation
hjson-rb copied to clipboard

hjson-rb does not work with ruby 3

Open appomsk opened this issue 3 years ago • 0 comments

[1] pry(main)> require 'hjson'
=> true
[2] pry(main)> Hjson.parse "1"
ArgumentError: wrong number of arguments (given 2, expected 1)
from /home/app/.rvm/gems/ruby-3.0.1/gems/hjson-0.1.2/lib/hjson/ast/parser.rb:41:in `initialize'
[3] pry(main)> RUBY_VERSION
=> "3.0.1"

I understand it is because of separation of positional and keyword arguments in Ruby 3.0. Sorry I don't know Ruby well to fix it and submit a pull request.

appomsk avatar Jun 26 '21 08:06 appomsk