summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-05 13:43:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-05 13:43:19 +0000
commit4d076e91c8ade0015817fc18104b1271e2ac4a40 (patch)
tree794cc93c4ce3a69a6122db9201e01f5e774410e3
parented0cba79ca34fa67c4f4d76bdb03391a12b2c5b6 (diff)
un.rb: refine regexp
* lib/un.rb (help): refine regexp to extract method name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/un.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/un.rb b/lib/un.rb
index 98121111a2..78d6d6e91c 100644
--- a/lib/un.rb
+++ b/lib/un.rb
@@ -342,7 +342,7 @@ def help
open(__FILE__) do |me|
while me.gets("##\n")
if help = me.gets("\n\n")
- if all or argv.delete help[/-e \w+/].sub(/-e /, "")
+ if all or argv.delete help[/^#\s*ruby\s.*-e\s+(\w+)/, 1]
print help.gsub(/^# ?/, "")
end
end