From 0d435835f97c63f23b90aa4e0984e73550e99402 Mon Sep 17 00:00:00 2001 From: Peter Ohler Date: Wed, 25 Dec 2024 16:45:47 -0500 Subject: [PATCH] Fix rubocop warnings --- examples/sax_ractor.rb | 2 +- lib/ox/element.rb | 2 +- lib/ox/instruct.rb | 2 +- ox.gemspec | 2 +- test/parse_cmp.rb | 2 +- test/sax/smart_test.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/sax_ractor.rb b/examples/sax_ractor.rb index 55064dc6..d15bb24a 100755 --- a/examples/sax_ractor.rb +++ b/examples/sax_ractor.rb @@ -19,7 +19,7 @@ class Saxtor < Ox::Sax # and throw it away otherwise. CYO = Struct.new(:ietf, :globs, :description) do def initialize(ietf = nil, globs = [], description = nil) - super(ietf, globs, description) + super end def to_s # Pretty print diff --git a/lib/ox/element.rb b/lib/ox/element.rb index 3ee50624..b811c361 100644 --- a/lib/ox/element.rb +++ b/lib/ox/element.rb @@ -79,7 +79,7 @@ def prepend_child(node) # - +other+ [Object] Object compare _self_ to. # *return* [Boolean] true if both Objects are equivalent, otherwise false. def eql?(other) - return false unless super(other) + return false unless super return false unless attributes == other.attributes return false unless nodes == other.nodes diff --git a/lib/ox/instruct.rb b/lib/ox/instruct.rb index b8ecad24..efebb6ca 100644 --- a/lib/ox/instruct.rb +++ b/lib/ox/instruct.rb @@ -23,7 +23,7 @@ def initialize(name) # - +other+ [Object] Object compare _self_ to. # *return* [Boolean] true if both Objects are equivalent, otherwise false. def eql?(other) - return false unless super(other) + return false unless super return false unless attributes == other.attributes return false unless content == other.content diff --git a/ox.gemspec b/ox.gemspec index b510a4f7..6e7963cd 100644 --- a/ox.gemspec +++ b/ox.gemspec @@ -38,5 +38,5 @@ serialization. } s.metadata['rubygems_mfa_required'] = 'true' - s.add_runtime_dependency 'bigdecimal', '>= 3.0' + s.add_dependency 'bigdecimal', '>= 3.0' end diff --git a/test/parse_cmp.rb b/test/parse_cmp.rb index 7c7d1070..c6e64577 100755 --- a/test/parse_cmp.rb +++ b/test/parse_cmp.rb @@ -38,7 +38,7 @@ def node_to_dict(element) def node_to_array(element) a = [] - element.nodes.each do |n| + element.nodes.map do |n| a.push(node_to_value(n)) end a diff --git a/test/sax/smart_test.rb b/test/sax/smart_test.rb index 75cd2438..08c6d33d 100755 --- a/test/sax/smart_test.rb +++ b/test/sax/smart_test.rb @@ -146,7 +146,7 @@ class ErrorsOnParentNormalElementTest < SaxSmartTest def initialize(*args) @w = lambda { |s, ws| "<#{ws}>" + s + "" } - super(*args) + super end def parents_of(el)