1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2013-07-05 13:43:19 +00:00
parent ed0cba79ca
commit 4d076e91c8

View file

@ -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