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:
parent
ed0cba79ca
commit
4d076e91c8
@ -342,7 +342,7 @@ def help
|
|||||||
open(__FILE__) do |me|
|
open(__FILE__) do |me|
|
||||||
while me.gets("##\n")
|
while me.gets("##\n")
|
||||||
if help = me.gets("\n\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(/^# ?/, "")
|
print help.gsub(/^# ?/, "")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user