Skip to content

Commit

Permalink
[ruby/irb] Remove unnecessary warning check on help command
Browse files Browse the repository at this point in the history
It's not an intentional behavior of the command and it behaves
differently in different environments. So checking it actually brings
more problem than benefit.

ruby/irb@b3203bc784
  • Loading branch information
st0012 authored and matzbot committed Oct 26, 2022
1 parent 73a0223 commit 0dc2e1a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions test/irb/test_cmd.rb
Expand Up @@ -422,9 +422,6 @@ def test_help
irb.eval_input
end

# the help command lazily loads rdoc by redefining the execute method
assert_match(/discarding old execute/, err) unless RUBY_ENGINE == 'truffleruby'

# the former is what we'd get without document content installed, like on CI
# the latter is what we may get locally
possible_rdoc_output = [/Nothing known about String#gsub/, /Returns a copy of self with all occurrences of the given pattern/]
Expand All @@ -450,8 +447,6 @@ def test_help_without_rdoc
end
end

# since LoadError will be raised, the execute won't be redefined
assert_no_match(/discarding old execute/, err)
# if it fails to require rdoc, it only returns the command object
assert_match(/=> IRB::ExtendCommand::Help\n/, out)
ensure
Expand Down

0 comments on commit 0dc2e1a

Please sign in to comment.