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

  1. require "fastruby"  
  2.   
  3. fastruby '  
  4. class X  
  5. def foo(*array)  
  6.   array.each do |x|  
  7.     p x  
  8.   end  
  9. end  
  10.   
  11. def bar(*args)  
  12.   foo(*args)  
  13. end  
  14. end  
  15. '  
  16.   
  17. x = X.new  
  18. x.foo(1,2,3) # prints 1,2 and 3  
  19. x.bar(4,5,6) # prints 4,5 and 6  

Remaining uncovered items on v0.0.13 release

No hay comentarios:

Publicar un comentario