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 | 40f9da08734e740a231451c7195083a8ee1dcbc5 (patch) | |
tree | e0b2edf8838a4cd61f3a50b3bb7abb7877feef6c | |
parent | 63de8155b0ac7858111a5975155855993bdb41f5 (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/branches/ruby_1_8@9862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | lib/rdoc/usage.rb | 2 |
2 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,9 @@ +Sat Jan 28 07:56:57 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] + Wed Jan 25 22:29:04 2006 Nobuyoshi Nakada <nobu@ruby-lang.org> * configure.in, dln.c, file.c, intern.h, missing.h (eaccess): use @@ -88,9 +94,9 @@ Thu Jan 12 11:53:08 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> [new feature] support 'command' option which is called just before popping up the balloon help. -Tue Jan 11 15:00:00 2006 Ville Mattila <mulperi@iki.fi> +Wed Jan 11 15:00:00 2006 Ville Mattila <mulperi@iki.fi> - * io.c (READ_PENDING*): Support solaris 64-bit enviroments. + * io.c (READ_PENDING*): Support solaris 64-bit environments. Solaris defines a opaque FILE struct when compiling 64 bit binaries. This means that we dont have access to _ptr etc. members anymore. The solution by Steven Lumos is to define 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 |