Toys
I just finished releasing a WHOLE bunch o' stuff, all gemified and cleaned up, mainly so that we could contribute the following solution to this week's ruby quiz (serializable procs):
require 'r2c_hacks'
class ProcStore # We have to have this because yaml calls allocate on Proc
def initialize(&proc)
@p = proc.to_ruby
end
def call(*args)
eval(@p).call(*args)
end
end
code = ProcStore.new { |x| return x+1 }
=> #<ProcStore:0x3db25c @p="proc do |x|\n return (x + 1)\nend">
OK, well, that obviously isn't the whole solution, but now that we've added Proc.to_ruby, it really is that simple. To see how simple it really is, check out our implementation:
class Proc
ProcStoreTmp = Class.new unless defined? ProcStoreTmp
def to_ruby
ProcStoreTmp.send(:define_method, :myproc, self)
m = ProcStoreTmp.new.method(:myproc)
result = m.to_ruby.sub!(/def myproc\(([^\)]+)\)/, 'proc do |\1|')
return result
end
end
We would have bypassed ProcStore entirely had we known how to get YAML to not call allocate on Proc when it was loading a proc back in. But, we were tired.
The Releases!
We released the following:
RubyInline 3.4.0 with:
+ 2 minor enhancements:
+ Changed inline to take the language and a hash of options.
+ Still backwards compatible, for now, and emits a warning.
+ Options are available via the builder passed to your block.
+ 2 bug fixes:
+ Modified caller discovery, yet again, due to changes in ruby 1.8.3.
+ More compatible and clean with non-gems systems.
ParseTree 1.3.7 with:
+ 3 bug fixes:
+ Fixed rubygem requires for non-gem systems.
+ Renamed on to on_error_in to make more clear.
+ Moved exceptions to their own tree to make catching cleaner.
ruby2c 1.0.0 beta 4 with:
+ 1 minor enhancements
+ Added gemspec (hastily).
+ 2 bug fixes
+ Translates bool type to VALUE since we were using Qtrue/Qfalse.
+ Fixed rubygems for non-gem systems.
and finally ZenHacks 1.0.1 with:
+ 4 minor enhancements:
+ Added Graph#save and edge accessors for customizations.
+ Added Proc#to_ruby in r2c_hacks.
+ Added RubyToRuby#rewrite_defn to support bmethods (read: procs).
+ Added Class#optimize(*methods) to zenoptimize.
+ Added bin/nopaste for cmdline access to nopaste on rafb.net.
+ Added bin/quickbench to generate ruby benchmark templates quickly.
+ 4 bug fixes:
+ Fixed gems for non-gem systems.
+ Fixed minor output problem with RubyToRuby#process_defn.
+ Added some minor (performance) enhancements to zenoptimize.
+ Added requirements to gemspec to quell whining.

Do you have any references discussing advanced programming in Ruby, i.e. dynamic features, meta-programming, etc. Coming from a Java background, I'm having trouble even formulating the question. Maybe I should just say I am looking for reference material on "things you can do in Ruby that can't be done in Java?" Something beyond Pickaxe.
Thanks!
Well, there is my blog, why's blog, and a bunch of others. If you read japanese there is a lot more in the advanced arena. But, I will say that ruby and java ARE turing complete languages, they all boil down to the same stuff in the long run.
The dynamic features of ruby are nice, but it is the basic expressiveness of ruby that shines over java.