From 40f9da08734e740a231451c7195083a8ee1dcbc5 Mon Sep 17 00:00:00 2001 From: ocean Date: Fri, 27 Jan 2006 22:58:07 +0000 Subject: * 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/branches/ruby_1_8@9862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/usage.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rdoc') diff --git a/lib/rdoc/usage.rb b/lib/rdoc/usage.rb index 08393c380b..def516b3d7 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 -- cgit v1.2.3