ruby-changes:15290
From: nobu <ko1@a...>
Date: Fri, 2 Apr 2010 13:40:51 +0900 (JST)
Subject: [ruby-changes:15290] Ruby:r27175 (trunk): * bin/erb: removed trailing spaces.
nobu 2010-04-02 13:40:34 +0900 (Fri, 02 Apr 2010) New Revision: 27175 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27175 Log: * bin/erb: removed trailing spaces. Modified files: trunk/bin/erb Index: bin/erb =================================================================== --- bin/erb (revision 27174) +++ bin/erb (revision 27175) @@ -1,6 +1,6 @@ #!/usr/bin/env ruby # Tiny eRuby --- ERB2 -# Copyright (c) 1999-2000,2002 Masatoshi SEKI +# Copyright (c) 1999-2000,2002 Masatoshi SEKI # You can redistribute it and/or modify it under the same terms as Ruby. require 'erb' @@ -14,11 +14,11 @@ if arg =~ /^-(.)(.*)/ if $1 == '-' arg, @maybe_arg = arg.split(/=/, 2) - return arg + return arg end raise 'unknown switch "-"' if $2[0] == ?- and $1 != 'T' if $2.size > 0 - self.unshift "-#{$2}" + self.unshift "-#{$2}" @maybe_arg = $2 else @maybe_arg = nil @@ -29,7 +29,7 @@ nil end end - + def ARGV.req_arg (@maybe_arg || self.shift || raise('missing argument')).tap { @maybe_arg = nil @@ -77,7 +77,7 @@ when '-T' # trim mode arg = ARGV.req_arg if arg == '-' - trim_mode = arg + trim_mode = arg next end raise "invalid trim mode #{arg.dump}" unless arg =~ /^[0-2]$/ @@ -97,7 +97,7 @@ end rescue # usage STDERR.puts $!.to_s - STDERR.puts File.basename($0) + + STDERR.puts File.basename($0) + " [switches] [inputfile]" STDERR.puts <<EOU -x print ruby script -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/