Skip to content

Commit

Permalink
Fix Psych::ScalarScanner on Ruby 3.0.0
Browse files Browse the repository at this point in the history
Remove the option strict_integer, it was introduced on Ruby 3.2.0 but we
don't really need it. Removing it, we make the code compatible from
3.0.0 to 3.2.0 at least.

Related MR: ruby/psych#537
  • Loading branch information
ceritium committed Mar 15, 2024
1 parent dc5c9bf commit cb9cf82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/flatito/yaml_with_line_number.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def scalar(*args)
end

class VisitorsToRuby < Psych::Visitors::ToRuby
def self.create(symbolize_names: false, freeze: false, strict_integer: false)
def self.create(symbolize_names: false, freeze: false)
class_loader = ClassLoader.new
scanner = Psych::ScalarScanner.new(class_loader, strict_integer: strict_integer)
scanner = Psych::ScalarScanner.new(class_loader)
new(scanner, class_loader, symbolize_names: symbolize_names, freeze: freeze)
end

Expand Down

0 comments on commit cb9cf82

Please sign in to comment.