On Sun, May 5, 2013 at 2:47 PM, Torimus NA <lists / ruby-forum.com> wrote:
> This is a known issue of rbenv. It cripples compiler flags, so the
> interpreter may run code about 400% slower.

When XCode 4.6 was released, it included a new version of Clang that
warned when 64 bit integers were implicitly converted to 32 bit. Ruby
treats all warnings as errors, and existing Ruby 1.9.3 releases had
code that triggered this warning, resulting in a build error on the
new Clang.

(You may recall many recent Ruby commits with messages like "suppress
warnings." When a new GCC or Clang introduces a new kind of warning,
it breaks the build for all old Ruby releases that trigger the
warning.)

To allow building the latest 1.9.3 patchlevel releases with the new
Clang, ruby-build suppresses the error by adding the
"-Wno-error=shorten-64-to-32" cflag. But! When you configure Ruby with
any CFLAGS set, Ruby omits its own default flags, including -O3,
resulting in a slow, unoptimized build. The work-around is to include
the CFLAGS that Ruby would have used by default:
https://github.com/sstephenson/ruby-build/pull/351

Upgrade ruby-build for a fix.