From 07bdc21feccf077a6b3282d6d2d040af17cf0c39 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 10 ++++++++-- lib/rdoc/usage.rb | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d1d201d70..781b7f51b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Jan 28 07:56:57 2006 Hirokazu Yamamoto + + * 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 * 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 [new feature] support 'command' option which is called just before popping up the balloon help. -Tue Jan 11 15:00:00 2006 Ville Mattila +Wed Jan 11 15:00:00 2006 Ville Mattila - * 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 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 -- cgit