summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-27 22:58:07 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-01-27 22:58:07 +0000
commit07bdc21feccf077a6b3282d6d2d040af17cf0c39 (patch)
treee0b2edf8838a4cd61f3a50b3bb7abb7877feef6c /lib
parentc9ce6a10f2f531831f82aba4892eb44f156ff35d (diff)
downloadruby-07bdc21feccf077a6b3282d6d2d040af17cf0c39.tar.gz
ruby-07bdc21feccf077a6b3282d6d2d040af17cf0c39.tar.xz
ruby-07bdc21feccf077a6b3282d6d2d040af17cf0c39.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/branches/ruby_1_8@9862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/rdoc/usage.rb2
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