summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Niknam <mhmd.niknam@gmail.com>2021-08-08 19:45:14 +1000
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit717ad64f4198066ae1eedfb166e38e8f00f44705 (patch)
treed52f60fd99e09364cf0c5fbefe0d6d025f300b45 /test
parent34e073c0ca4a7bb0c7e07df883babeaafb03b438 (diff)
[rubygems/rubygems] Replace StandardError with Exception
We think it's unlikely that `rubygems/defaults/operating_system` could be shipped with a SyntaxError so StandardError could be better choice to prevent "false positives" errors. https://github.com/rubygems/rubygems/commit/1f73e784dd
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'test')
-rw-r--r--test/rubygems/test_rubygems.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/rubygems/test_rubygems.rb b/test/rubygems/test_rubygems.rb
index f94481dc24..493b9fdf4a 100644
--- a/test/rubygems/test_rubygems.rb
+++ b/test/rubygems/test_rubygems.rb
@@ -10,12 +10,12 @@ class GemTest < Gem::TestCase
pend "does not apply to truffleruby" if RUBY_ENGINE == 'truffleruby'
path = util_install_operating_system_rb <<-RUBY
- intentional synt'ax error
+ intentionally_not_implemented_method
RUBY
output = Gem::Util.popen(*ruby_with_rubygems_and_fake_operating_system_in_load_path(path), '-e', "'require \"rubygems\"'", {:err => [:child, :out]}).strip
assert !$?.success?
- assert_includes output, "unterminated string meets end of file (SyntaxError)"
+ assert_includes output, "undefined local variable or method `intentionally_not_implemented_method'"
assert_includes output, "Loading the rubygems/defaults/operating_system.rb file caused an error. " \
"This file is owned by your OS, not by rubygems upstream. " \
"Please find out which OS package this file belongs to and follow the guidelines from your OS to report " \