From cb9cf82809ecd0c783a5d8f43367ad91ef515dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Galisteo?= Date: Fri, 15 Mar 2024 16:07:11 +0100 Subject: [PATCH] Fix Psych::ScalarScanner on Ruby 3.0.0 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: https://github.com/ruby/psych/pull/537 --- lib/flatito/yaml_with_line_number.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/flatito/yaml_with_line_number.rb b/lib/flatito/yaml_with_line_number.rb index 3c53692..e70fbd3 100644 --- a/lib/flatito/yaml_with_line_number.rb +++ b/lib/flatito/yaml_with_line_number.rb @@ -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