Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failures with ruby3.1 #144

Closed
boutil opened this issue Oct 28, 2022 · 0 comments
Closed

test failures with ruby3.1 #144

boutil opened this issue Oct 28, 2022 · 0 comments

Comments

@boutil
Copy link
Contributor

boutil commented Oct 28, 2022

Hi,

In Debian, we get 4 failing tests with ruby3.1. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019612.
The bug is about 2.4.8, but the same happens with 2.4.13

  1) Failure:
BinData::Primitive::when defining with errors#test_0003_fails when field name shadows an existing method [/home/boutil/debian/ruby-team/ruby-bindata/test/primitive_test.rb:46]:
--- expected
+++ actual
@@ -1 +1,4 @@
-"field 'object_id' shadows an existing method in ExistingNamePrimitive"
+"field 'object_id' shadows an existing method
+
+            raise NameError.new(\"\", name), \"field '\#{name}' shadows an existing method\"
+            ^^^^^ in ExistingNamePrimitive"


  2) Failure:
BinData::Record::when defining with errors#test_0007_fails on reserved names [/home/boutil/debian/ruby-team/ruby-bindata/test/record_test.rb:71]:
--- expected
+++ actual
@@ -1 +1,4 @@
-"field 'invert' is a reserved name in ReservedNameRecord"
+"field 'invert' is a reserved name
+
+            raise NameError.new(\"\", name), \"field '\#{name}' is a reserved name\"
+            ^^^^^ in ReservedNameRecord"


  3) Failure:
BinData::Record::when defining with errors#test_0008_fails when field name shadows an existing method [/home/boutil/debian/ruby-team/ruby-bindata/test/record_test.rb:80]:
--- expected
+++ actual
@@ -1 +1,4 @@
-"field 'object_id' shadows an existing method in ExistingNameRecord"
+"field 'object_id' shadows an existing method
+
+            raise NameError.new(\"\", name), \"field '\#{name}' shadows an existing method\"
+            ^^^^^ in ExistingNameRecord"


  4) Failure:
BinData::Record::when defining with errors#test_0005_fails on malformed names [/home/boutil/debian/ruby-team/ruby-bindata/test/record_test.rb:52]:
--- expected
+++ actual
@@ -1 +1,4 @@
-"field '45' is an illegal fieldname in MalformedNameRecord"
+"field '45' is an illegal fieldname
+
+            raise NameError.new(\"\", name), \"field '\#{name}' is an illegal fieldname\"
+            ^^^^^ in MalformedNameRecord"

It seems that the format of the backtrace changed with this new version of Ruby, and that the method must_raise_on_line is not fit for this modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant