ankane / tokenizers-ruby

Fast state-of-the-art tokenizers for Ruby
Apache License 2.0
132 stars 6 forks source link

Ruby 2.7 didn't have JSON.load_file method #26

Closed elct9620 closed 1 year ago

elct9620 commented 1 year ago

I got this error when using Ruby 2.7.7

undefined method `load_file' for JSON:Module (NoMethodError)

I think the reason is .load_file method is added after Ruby 3.0 https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html

ankane commented 1 year ago

Hey @elct9620, thanks for reporting! Will push a new release shortly.