diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-27 22:58:07 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-01-27 22:58:07 +0000 |
commit | 3842ceab25bc683f735c356144dab4b9ca0c3857 (patch) | |
tree | 08d1fe706960364b16e29e7faed23023bbed06d1 /lib/rdoc | |
parent | c6c1f03f149d8c922377585fb0beb2110495a136 (diff) | |
download | ruby-3842ceab25bc683f735c356144dab4b9ca0c3857.tar.gz ruby-3842ceab25bc683f735c356144dab4b9ca0c3857.tar.xz ruby-3842ceab25bc683f735c356144dab4b9ca0c3857.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@9862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc')
-rw-r--r-- | lib/rdoc/usage.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rdoc/usage.rb b/lib/rdoc/usage.rb index 08393c380..def516b3d 100644 --- a/lib/rdoc/usage.rb +++ b/lib/rdoc/usage.rb @@ -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 |