domingo, 9 de octubre de 2011

Fastruby 0.0.13 released with support for splat arguments and method with array arguments

Fastruby is a gem which allows to execute ruby code much faster than normal, currently in a state of transition between a spike and a usable gem, it is released when possible with incremental improvements.
The v0.0.13 release of fastruby make a little internal design improvement regarding translator class and the implementation of splat arguments and methods with optional arguments (see examples below)

Install

You can clone the repository at github:
git clone git://github.com/tario/fastruby.git
git checkout v0.0.13
Or install it using gem install:
gem install fastruby

New Features



Examples of code being supported

Multiple arguments and call with splat

require "fastruby"

fastruby '
class X
def foo(*array)
array.each do |x|
p x
end
end

def bar(*args)
foo(*args)
end
end
'

x = X.new
x.foo(1,2,3) # prints 1,2 and 3
x.bar(4,5,6) # prints 4,5 and 6

Remaining uncovered items on v0.0.13 release

No hay comentarios:

Publicar un comentario