FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add file path to error message when unlinking non-existing file by katafrakt · Pull Request #9117 · jruby/jruby · GitHub

/ jruby Public

Add file path to error message when unlinking non-existing file - #9117

Merged
headius merged 1 commit into
jruby:masterfrom
katafrakt:fileutils-error-msg
Dec 10, 2025
Merged

Add file path to error message when unlinking non-existing file#9117
headius merged 1 commit into
jruby:masterfrom
katafrakt:fileutils-error-msg

Conversation

Copy link
Copy Markdown
Contributor

This changes error message when doing FileUtils.rm on a non-existing file.

Ruby 3.4.1:

irb(main):005> FileUtils.rm("/tmp/blah")
/home/katafrakt/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/fileutils.rb:2332:in 'File.unlink': No such file or directory @ apply2files - /tmp/blah (Errno::ENOENT)
	from /home/katafrakt/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/fileutils.rb:2332:in 'block in FileUtils::Entry_#remove_file'

In JRuby 10.0.2.0:

irb(main):003> FileUtils.rm("/tmp/blah")
org/jruby/RubyFile.java:1218:in 'unlink': No such file or directory - No such file or directory (Errno::ENOENT)
	from /home/katafrakt/.local/share/mise/installs/ruby/jruby-10.0.2.0/lib/ruby/stdlib/fileutils.rb:2332:in 'block in remove_file'

After changes in this PR:

irb(main):001> FileUtils.rm("/tmp/blah")
org/jruby/RubyFile.java:1219:in 'unlink': No such file or directory - /tmp/blah (Errno::ENOENT)
	from /home/katafrakt/dev/github/jruby/lib/ruby/stdlib/fileutils.rb:2332:in 'block in remove_file'

headius added this to the JRuby 10.0.3.0 milestone Dec 8, 2025

headius commented Dec 8, 2025

Copy link
Copy Markdown
Member

Simple fix, thanks!

headius merged commit 0c09944 into jruby:master Dec 10, 2025
76 of 77 checks passed
katafrakt deleted the fileutils-error-msg branch December 10, 2025 13:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL