Skip to content

Instantly share code, notes, and snippets.

@arturaz
Created May 9, 2012 18:53
Show Gist options
  • Save arturaz/2647953 to your computer and use it in GitHub Desktop.
Save arturaz/2647953 to your computer and use it in GitHub Desktop.
?> Pmg.Runner.ensurePool(
?> galaxy.id.to_java(:int), galaxy.ruleset,
?> galaxy.pool_free_zones.to_java(:int),
?> max_zone_iterations.to_java(:int),
?> galaxy.pool_free_home_ss.to_java(:int),
?> max_home_ss_iterations.to_java(:int)
>> )
TypeError: cannot convert instance of class org.jruby.java.proxies.ConcreteJavaProxy to int
from (irb):37:in `evaluate'
from org/jruby/RubyKernel.java:1091:in `eval'
from org/jruby/RubyKernel.java:1413:in `loop'
from org/jruby/RubyKernel.java:1200:in `catch'
from org/jruby/RubyKernel.java:1200:in `catch'
from /home/arturas/.rvm/rubies/jruby-head-n16/bin/jirb:17:in `(root)'
>> galaxy.id.to_java(:int)
=> #<Java::JavaLang::Integer:0x10f2ab8>
>> galaxy.pool_free_zones.to_java(:int)
=> #<Java::JavaLang::Integer:0xbdcdf7>
>>
?> max_zone_iterations.to_java(:int)
=> #<Java::JavaLang::Integer:0x11d5422>
>> galaxy.pool_free_home_ss.to_java(:int)
=> #<Java::JavaLang::Integer:0x7bfdaf>
>> max_home_ss_iterations.to_java(:int)
=> #<Java::JavaLang::Integer:0xbdcdf7>
@arturaz
Copy link
Author

arturaz commented May 9, 2012

>> galaxy.ruleset
=> "default"
>> id = galaxy.id.to_java(:int)
=> #<Java::JavaLang::Integer:0x10f2ab8>
>> pfz = galaxy.pool_free_zones.to_java(:int)
=> #<Java::JavaLang::Integer:0xbdcdf7>
>> mzi = max_zone_iterations.to_java(:int)
=> #<Java::JavaLang::Integer:0x11d5422>
>> pfhs = galaxy.pool_free_home_ss.to_java(:int)
=> #<Java::JavaLang::Integer:0x28afbb>
>> mhsi = max_home_ss_iterations.to_java(:int)
=> #<Java::JavaLang::Integer:0xbdcdf7>
>> Pmg.Runner.ensurePool(id, galaxy.ruleset, pfz, mzi, pfhs, mhsi)
TypeError: cannot convert instance of class org.jruby.java.proxies.ConcreteJavaProxy to int
    from (irb):56:in `evaluate'
    from org/jruby/RubyKernel.java:1091:in `eval'
    from org/jruby/RubyKernel.java:1413:in `loop'
    from org/jruby/RubyKernel.java:1200:in `catch'
    from org/jruby/RubyKernel.java:1200:in `catch'
    from /home/arturas/.rvm/rubies/jruby-head-n16/bin/jirb:17:in `(root)'

@arturaz
Copy link
Author

arturaz commented May 9, 2012

  def ensurePool(
    galaxyId: Int, ruleset: String,
    freeZones: Int, maxZoneIterations: Int,
    freeHomeSystems: Int, maxHomeIterations: Int
  ): EnsurePoolResult 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment