summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-17 06:23:39 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-17 06:23:39 (GMT)
commit99eeaca5479b4f27eb6ca086924b0b04752d7a3a (patch)
tree300f80e8a1dee7262574fe06926e3b5e0caa6a8a /bin
parenta2797a454c94318c2e4448f61a72074220c7d880 (diff)
erb: fix -U option
* bin/erb (ERB::Main#run): fix NoMethodError at -U option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bin')
-rwxr-xr-xbin/erb4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/erb b/bin/erb
index 6a7ea7d..2459680 100755
--- a/bin/erb
+++ b/bin/erb
@@ -137,8 +137,8 @@ EOU
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