Skip to content

Fix Ruby 4 compatibility - #2

Merged
yyachi merged 1 commit into
misasa:masterfrom
tak-kunihiro:fix/ruby-4-compatibility
Aug 4, 2026
Merged

Fix Ruby 4 compatibility#2
yyachi merged 1 commit into
misasa:masterfrom
tak-kunihiro:fix/ruby-4-compatibility

Conversation

@tak-kunihiro

Copy link
Copy Markdown
Member

Summary

Fix compatibility with Ruby 4.

Replace removed File.exists? with File.exist?.
Replace the deprecated trollop dependency with optimist.
Explicitly require fileutils in the test setup and update the related tests.

Why

Ruby 4 removed File.exists?, causing image-scalebar to fail with NoMethodError. The deprecated trollop gem also emits a warning and has been replaced by its maintained successor.

Testing

Ruby 4.0.6: 19 examples, 0 failures.
Confirmed that image-scalebar -w 13 phasemap_JAUB.png generates the expected .tex file.

Ruby 3.6 compatibility has not been tested locally. Please confirm it in the supported environment.

@tak-kunihiro
tak-kunihiro marked this pull request as ready for review August 4, 2026 09:47
@yyachi
yyachi merged commit 192e966 into misasa:master Aug 4, 2026
0 of 3 checks passed
@yyachi

yyachi commented Aug 4, 2026

Copy link
Copy Markdown
Member

ご対応ありがとうございます!確認してマージいたしました。

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.

2 participants