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 | a0dc66d0b51da14d6906de0751a6cf072a89f994 (patch) | |
tree | 08d1fe706960364b16e29e7faed23023bbed06d1 | |
parent | bd2ea061ff5d86f89298bfc21850f13c1b9bde98 (diff) |
* 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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/rdoc/usage.rb | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Sat Jan 28 07:49:30 2006 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> + + * 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] + Thu Jan 26 15:55:52 2006 Yukihiro Matsumoto <matz@ruby-lang.org> * ext/socket/socket.c: turn on do_not_reverse_lookup by default. 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 |