Skip to content

Conversation

@byroot
Copy link
Member

@byroot byroot commented Feb 12, 2025

Fix GH-130

@byroot
Copy link
Member Author

byroot commented Feb 12, 2025

JRuby needs the same fix it seems.

@byroot
Copy link
Member Author

byroot commented Feb 12, 2025

JRuby needs the same fix it seems.

Done.

assert_equal("42", s.matched)

s = create_string_scanner("42abc")
assert_equal(273084, s.scan_integer(base: 16))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using hex literal for easy to read?

Suggested change
assert_equal(273084, s.scan_integer(base: 16))
assert_equal(0x42abc, s.scan_integer(base: 16))

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@byroot byroot requested a review from kou February 13, 2025 07:32
@byroot
Copy link
Member Author

byroot commented Feb 13, 2025

Thanks for the review. Updated.

@kou kou merged commit 4e5f17f into ruby:master Feb 13, 2025
40 checks passed
@kou
Copy link
Member

kou commented Feb 13, 2025

Thanks!

matzbot pushed a commit to ruby/ruby that referenced this pull request Feb 14, 2025
mrzasa pushed a commit to mrzasa/ruby that referenced this pull request Feb 21, 2025
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

Successfully merging this pull request may close these issues.

#matched after #scan_integer causes segfault

3 participants