Skip to content

Commit

Permalink
[rubygems/rubygems] Remove LoadError message in regards to requiring …
Browse files Browse the repository at this point in the history
…a relative file

Ruby 1.9.2 removed "." from LOAD_PATH for robustness and security reasons.
This code was introduced by rubygems/rubygems@56fc830 commit
to helping users understand the issue and had a guard condition to include the message for `RUBY_VERSION >= "1.9"`.
However, the guard condition was removed as part of the "Ruby version leftover" cleanup by
rubygems/rubygems@8c9cf76

Ruby 1.9 development was ended a long time ago and this message is not useful anymore.

rubygems/rubygems@a23609b15a
  • Loading branch information
daniel-niknam authored and hsbt committed Jul 27, 2021
1 parent 705b1bd commit 90899c5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions lib/bundler.rb
Expand Up @@ -653,10 +653,6 @@ def eval_gemspec(path, contents)
rescue ScriptError, StandardError => e
msg = "There was an error while loading `#{path.basename}`: #{e.message}"

if e.is_a?(LoadError)
msg += "\nDoes it try to require a relative path? That's been removed in Ruby 1.9"
end

raise GemspecError, Dsl::DSLError.new(msg, path, e.backtrace, contents)
end

Expand Down
1 change: 0 additions & 1 deletion spec/bundler/runtime/setup_spec.rb
Expand Up @@ -1066,7 +1066,6 @@ def clean_load_path(lp)

expect(err.lines.map(&:chomp)).to include(
a_string_starting_with("[!] There was an error while loading `bar.gemspec`:"),
a_string_starting_with("Does it try to require a relative path? That's been removed in Ruby 1.9."),
" # from #{default_bundle_path "bundler", "gems", "bar-1.0-#{ref[0, 12]}", "bar.gemspec"}:1",
" > require 'foobarbaz'"
)
Expand Down

0 comments on commit 90899c5

Please sign in to comment.