[前][次][番号順一覧][スレッド一覧]

ruby-changes:35912

From: nobu <ko1@a...>
Date: Fri, 17 Oct 2014 15:23:54 +0900 (JST)
Subject: [ruby-changes:35912] nobu:r47993 (trunk): erb: fix -U option

nobu	2014-10-17 15:23:39 +0900 (Fri, 17 Oct 2014)

  New Revision: 47993

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47993

  Log:
    erb: fix -U option
    
    * bin/erb (ERB::Main#run): fix NoMethodError at -U option.

  Modified files:
    trunk/bin/erb
Index: bin/erb
===================================================================
--- bin/erb	(revision 47992)
+++ bin/erb	(revision 47993)
@@ -137,8 +137,8 @@ EOU https://github.com/ruby/ruby/blob/trunk/bin/erb#L137
 
     def set_encoding(extern, intern = nil)
       verbose, $VERBOSE = $VERBOSE, nil
-      Encoding.default_external = extern unless extern.nil? || extern.empty?
-      Encoding.default_internal = intern unless intern.nil? || intern.empty?
+      Encoding.default_external = extern unless extern.nil? || extern == ""
+      Encoding.default_internal = intern unless intern.nil? || intern == ""
       [$stdin, $stdout, $stderr].each do |io|
         io.set_encoding(extern, intern)
       end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]