mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rdoc/usage.rb: support "a:0:33" style caller[-1]. In this case
file name is "a:0". I don't know this really happens though... [ruby-Bugs:3344] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bd2ea061ff
commit
a0dc66d0b5
2 changed files with 7 additions and 1 deletions
|
@ -96,7 +96,7 @@ module RDoc
|
|||
|
||||
# Display usage
|
||||
def RDoc.usage_no_exit(*args)
|
||||
main_program_file, = caller[-1].split(/:\d+/, 2)
|
||||
main_program_file = caller[-1].sub(/:\d+$/, '')
|
||||
comment = File.open(main_program_file) do |file|
|
||||
find_comment(file)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue