Ruby 1.9.3-p0 requires a minor patch to make ruby-debug19 work. If you have
ruby-build
and rbenv
installed, these scripts will install ruby-1.9.3-p0.
curl https://raw.github.com/gist/1633720/install-ruby-1.9.3-p0.sh | sh
module Yehudalize | |
def method_missing(method_sym, *arguments, &block) | |
if method_sym.to_s =~ /^(omg_)?(.*)_to_me$/ | |
send($2.to_sym, *arguments, &block) | |
else | |
super | |
end | |
end | |
end |
############# THIS IS WITHIN THE LIBRARY ############# | |
class Foo | |
def initialize(a, b, c, opts={}) | |
#do some stuff | |
end | |
end | |
###################################################### |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
def foo(x); 99; end | |
a = foo (44) / 11 | |
foo = 99999999 | |
b = foo (44) / 11 | |
puts "a: #{a} b: #{b}" #output of "a: 99 b: 9" | |
# s(:defn, :foo, s(:args, :x), s(:lit, 99)), | |
# s(:lasgn, :a, s(:call, nil, :foo, s(:call, s(:lit, 44), :/, s(:lit, 11)))), | |
# s(:lasgn, :foo, s(:lit, 99999999)), | |
# s(:lasgn, :b, s(:call, s(:call, nil, :foo, s(:lit, 44)), :/, s(:lit, 11)))) |
build_package_combined_patch() { | |
local package_name="$1" | |
{ | |
curl https://github.com/funny-falcon/ruby/compare/p385...p385_ary_queue.diff | patch -p1 | |
curl https://github.com/funny-falcon/ruby/compare/p385...p385_st_opt.diff | patch -p1 | |
curl https://github.com/funny-falcon/ruby/compare/p385...p385_backport_speedup_require.diff | patch -p1 | |
curl https://github.com/funny-falcon/ruby/compare/p385...p385_backport_gc.diff | patch -p1 | |
autoconf | |
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS |