# \[Open\] Ruby option -Ke and -KE doesn't work well on Mac OSX 10.9.2

**URL:** <https://www.ruby-forum.com/t/open-ruby-option-ke-and-ke-doesnt-work-well-on-mac-osx-10-9-2/241042>\
**Category:** Development\
**Created:** [May 10, 2014, 1:40pm UTC](https://www.ruby-forum.com/t/open-ruby-option-ke-and-ke-doesnt-work-well-on-mac-osx-10-9-2/241042 "2014-05-10T13:40:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [May 10, 2014, 1:40pm UTC](https://www.ruby-forum.com/t/open-ruby-option-ke-and-ke-doesnt-work-well-on-mac-osx-10-9-2/241042/1 "2014-05-10T13:40:15Z")

</div>

Issue #9825 has been reported by Ayumu AIZAWA.

* * *

Bug #9825: Ruby option -Ke and -KE doesn’t work well on Mac OSX 10.9.2

> **[Bug #9825: Ruby option -Ke and -KE doesn't work well on Mac OSX 10.9.2 - Ruby...](https://bugs.ruby-lang.org/issues/9825)**
>
> Redmine

- Author: Ayumu AIZAWA
- Status: Open
- Priority: Normal
- Assignee:
- Category:
- Target version: current: 2.2.0
- ruby -v: ruby 2.2.0dev (2014-05-10 trunk 45900) [x86\_64-darwin13]
- Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN

* * *

手元の環境でビルドした環境でテストしたころ、TestRubyOptions#test\_kanji で EUC-JP が invalid byte  
sequence in EUC-JP と判定されて失敗します。  
その他のエンコード（Windows-31J、UTF-8、ASCII-8BIT）は問題なく通るようです。

$ make test-all TESTS=‘-vn /test\_kanji/ test/ruby/test\_rubyoptions.rb’  
CC = clang  
LD = ld  
LDSHARED = clang -dynamic -bundle  
CFLAGS = -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter  
-Wno-parentheses -Wno-long-long -Wno-missing-field-initializers  
-Wunused-variable -Werror=pointer-arith -Werror=write-strings  
-Werror=declaration-after-statement -Werror=shorten-64-to-32  
-Werror=implicit-function-declaration -Werror=division-by-zero  
-Werror=deprecated-declarations -Werror=extra-tokens -pipe -arch x86\_64  
XCFLAGS = -D\_FORTIFY\_SOURCE=2 -fstack-protector -fno-strict-overflow  
-fvisibility=hidden -DRUBY\_EXPORT -fPIE  
CPPFLAGS = -D\_XOPEN\_SOURCE -D\_DARWIN\_C\_SOURCE  
-D\_DARWIN\_UNLIMITED\_SELECT -D\_REENTRANT -I.  
-I.ext/include/x86\_64-darwin13 -I./include -I.  
DLDFLAGS = -Wl,-undefined,dynamic\_lookup  
-Wl,-multiply\_defined,suppress -fstack-protector -Wl,-u,\_objc\_msgSend  
-Wl,-pie -framework CoreFoundation -arch x86\_64  
SOLIBS =  
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)  
Target: x86\_64-apple-darwin13.1.0  
Thread model: posix  
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext  
– --disable-gems “./test/runner.rb” --ruby=“./miniruby -I./lib -I.  
-I.ext/common ./tool/runruby.rb --extout=.ext – --disable-gems” -vn  
/test\_kanji/ test/ruby/test\_rubyoptions.rb  
Run options: “–ruby=./miniruby -I./lib -I. -I.ext/common  
./tool/runruby.rb --extout=.ext – --disable-gems” -vn /test\_kanji/

# Running tests:

TestRubyOptions#test\_kanji = 0.07 s = F

Finished tests in 0.080113s, 12.4824 tests/s, 62.4118 assertions/s.

1. Failure:  
TestRubyOptions#test\_kanji  
[/Users/ayumin/github/ruby/test/ruby/test\_rubyoptions.rb:131]:  
\<[“EUC-JP”]\> expected but was  
\<[]\>.

* * *

\<[]\> expected but was  
\<[“/Users/ayumin/github/ruby/lib/rubygems/specification.rb:710:in `[]':  
invalid byte sequence in EUC-JP (ArgumentError)”,  
“\tfrom /Users/ayumin/github/ruby/lib/rubygems/specification.rb:710:in  
`block in each\_gemspec’”,  
“\tfrom /Users/ayumin/github/ruby/lib/rubygems/specification.rb:709:in  
`each’”,  
“\tfrom /Users/ayumin/github/ruby/lib/rubygems/specification.rb:709:in  
`each\_gemspec’”,  
“\tfrom /Users/ayumin/github/ruby/lib/rubygems/specification.rb:724:in  
`each\_spec’”,  
“\tfrom /Users/ayumin/github/ruby/lib/rubygems/specification.rb:758:in  
`load\_defaults’”,  
“\tfrom /Users/ayumin/github/ruby/lib/rubygems.rb:1211:in `\<top  
(required)\>'”,  
“\tfrom internal:gem\_prelude:1:in `require’”,  
“\tfrom internal:gem\_prelude:1:in `'”]\>.

1 tests, 5 assertions, 1 failures, 0 errors, 0 skips

ruby -v: ruby 2.2.0dev (2014-05-10 trunk 45900) [x86\_64-darwin13]  
make: \*\*\* [yes-test-all] Error 1
