bug3760.patch

Eito Katagiri, 09/02/2010 09:29 PM

Download (1.04 KB)

View differences:

lib/irb/cmd/help.rb
24 24
            Ri.interactive
25 25
            return
26 26
          end
27
          names.each do |name|
28
            begin
29
              Ri.get_info_for(name.to_s)
30
            rescue RDoc::RI::Error
31
              puts $!.message
32
            end
27
          begin
28
            Ri.display_names(names)
29
          rescue RDoc::RI::Error
30
            puts $!.message
33 31
          end
34 32
          nil
35 33
        end
test/irb/test_cmd_help.rb
1
require 'test/unit'
2
require 'irb/cmd/help'
3

  
4
module IRB
5
  module ExtendCommand
6
    class TestHelp < ::Test::Unit::TestCase
7
      def test_execute
8
        bug3760 = "[ruby-core:31927]"
9
        assert_nothing_raised(bug3760) do
10
          Help.new(nil).execute("String.new")
11
        end
12
      end
13
    end
14
  end
15
end