On Mar 12, 2009, at 9:11 PM, Charles Oliver Nutter wrote:

I have committed another round of work on compiler2, and it now supports signatures. Here's an example:

require 'rbconfig'
require 'java'
require 'tool/signature'

class MyRubyClass
 def helloWorld
   puts "Hello from Ruby"
 end
 def goodbyeWorld(a)
   puts a
 end
 %w[boolean byte short char int long float double].each do |type|
   java_type = Java.send type
   eval "def #{type}Method(a); a; end"
   signature "#{type}Method", [java_type] => java_type
 end
 def nevermore(*a)
   a[0]
 end

 signature :helloWorld, [] => Java::void
 signature :goodbyeWorld, [java.lang.String] => Java::void
end

Is the compiler executing this script instead of running it then? All the requires go through, mixins are applied, etc, right?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to