Calling the JRuby parser from Ruby causes a xVarDynamicScope cannot grow 
exception
----------------------------------------------------------------------------------

                 Key: JRUBY-5154
                 URL: http://jira.codehaus.org/browse/JRUBY-5154
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
    Affects Versions: JRuby 1.5.3
            Reporter: Tim Felgentreff
            Priority: Minor


The following code causes a FourVarDynamicScope cannot grow exception when 
used. It suggests using a ManyVarDynamicScope.

require 'java'
import 'java.io.File'
import 'java.io.FileInputStream'
import 'org.jruby.Ruby'

def check(file = "test.rb")
  begin
    runtime = Ruby.global_runtime
    io = FileInputStream.new(File.new("/tmp/#{file}"))
    runtime.parse_from_main(io, file)
  rescue SyntaxError => e
    puts "#{e.exception.message}"
  end
end

This is easily fixed by having the method take a (*args) parameter, but that 
seems like an ugly workaround.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

    http://xircles.codehaus.org/manage_email


Reply via email to