buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Sieger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (BUILDR-3) Buildr being usable on JRuby
Date Thu, 17 Jan 2008 23:01:54 GMT

    [ https://issues.apache.org/jira/browse/BUILDR-3?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12560139#action_12560139
] 

Nick Sieger commented on BUILDR-3:
----------------------------------

If JRuby running buildr should need to fork itself, you should know that the default behavior
of JRuby is to spawn another instance of itself in the same VM. If you want to pass Java VM
arguments, then you'll want to actually fork a subprocess VM.  To do this:

{noformat}
  require 'rbconfig'
  require 'jruby'
  RUBY = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
  def jruby(*args)
    prev_in_process = JRuby.runtime.instance_config.run_ruby_in_process
    JRuby.runtime.instance_config.run_ruby_in_process = false
    system "#{RUBY} #{args.join(' ')}"
  ensure
    JRuby.runtime.instance_config.run_ruby_in_process = prev_in_process
  end
{noformat}


> Buildr being usable on JRuby
> ----------------------------
>
>                 Key: BUILDR-3
>                 URL: https://issues.apache.org/jira/browse/BUILDR-3
>             Project: Buildr
>          Issue Type: New Feature
>         Environment: JDK 1.6. 
> JRuby SNAPSHOT: jruby-complete-1.1-20071211.100054-17
>            Reporter: Victor Hugo Borja
>            Assignee: Assaf Arkin
>         Attachments: 0001-Added-the-tools.jar-to-the-systemClassLoader-this-m.patch,
0001-BuildR-is-usable-in-JRuby.patch, 0001-More-JRuby-1.1RC1-integration-changes-for-buildr-1.patch,
0002-Use-RubyString.to_java_bytes-instead-of-unpacking-th.patch
>
>
> Attached patch makes buildr-HEAD usable on JRuby. See the patch changelog for details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message