mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[ruby/irb] Change show_source tests into integration tests
* Remove trailing spaces
* Migrate show_source tests to integration tests
Because show_source tests often need to define class and/or methods,
they can easily leak state to other tests. Changing them to integration
tests will ensure that they are run in a clean environment.
* Fix NoMethodError caused by SourceFinder#method_target
3c39f13397
This commit is contained in:
parent
476a231e7e
commit
fadd28c7ba
3 changed files with 265 additions and 228 deletions
|
@ -77,6 +77,8 @@ module IRB
|
|||
target_method = target_method.super_method if target_method
|
||||
end
|
||||
target_method.nil? ? nil : target_method.source_location
|
||||
rescue NameError
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue