Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'jruby-1_7' into merge
Browse files Browse the repository at this point in the history
Conflicts:
	VERSION
	core/pom.xml
	core/src/main/java/org/jruby/RubyString.java
	core/src/main/java/org/jruby/RubyStruct.java
	core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java
	docs/man/pom.xml
	docs/pom.xml
	ext/pom.xml
	ext/readline/pom.xml
	ext/ripper/pom.xml
	lib/pom.rb
	lib/pom.xml
	maven/jruby-complete/pom.xml
	maven/jruby-complete/src/it/integrity/verify.bsh
	maven/jruby-dist/pom.xml
	maven/jruby-dist/src/it/integrity/verify.bsh
	maven/jruby-jars/pom.xml
	maven/jruby-jars/src/it/integrity/verify.bsh
	maven/jruby-noasm/pom.xml
	maven/jruby-noasm/src/it/integrity/verify.bsh
	maven/jruby-rake-plugin/pom.xml
	maven/jruby-stdlib/pom.xml
	maven/jruby/pom.rb
	maven/jruby/pom.xml
	maven/jruby/src/it/integrity/verify.bsh
	maven/jruby/src/it/runnable/pom.xml
	maven/pom.xml
	pom.xml
	rakelib/test.rake
	spec/regression/GH-2524_bigdecimal_loss_of_precision_with_different_excution_order_spec.rb
	test/externals/ruby1.9/excludes/OpenSSL/TestASN1.rb
	test/externals/ruby1.9/excludes/OpenSSL/TestCipher.rb
	test/externals/ruby1.9/excludes/OpenSSL/TestDigest.rb
	test/externals/ruby1.9/excludes/OpenSSL/TestX509Name.rb
	test/externals/ruby1.9/excludes/OpenSSL/TestX509Request.rb
	test/externals/ruby1.9/openssl/test_asn1.rb
	test/pom.xml
	test/test_adding_pem_to_x509store.rb
mkristian committed Feb 7, 2015
2 parents eb3740c + b6f907f commit e3d93f2
Showing 34 changed files with 2,333 additions and 102 deletions.
12 changes: 6 additions & 6 deletions antlib/extra.xml
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ build jruby-complete.jar
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
<arg value='-cp'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.19-SNAPSHOT.jar'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.20-SNAPSHOT.jar'/>
<arg value='org.jruby.Main'/>
<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>
<arg value='-r./test/ruby19_env.rb'/>
@@ -137,7 +137,7 @@ build jruby-complete.jar
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
<arg value='-cp'/>
<arg value='core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-1.7.19-SNAPSHOT.jar'/>
<arg value='core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-1.7.20-SNAPSHOT.jar'/>
<arg value='org.jruby.Main'/>
<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>
<arg value='-r./test/ruby19_env.rb'/>
@@ -153,7 +153,7 @@ build jruby-complete.jar
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
<arg value='-cp'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.19-SNAPSHOT.jar'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.20-SNAPSHOT.jar'/>
<arg value='org.jruby.Main'/>
<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>
<arg value='-r./test/ruby19_env.rb'/>
@@ -169,7 +169,7 @@ build jruby-complete.jar
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
<arg value='-cp'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.19-SNAPSHOT.jar'/>
<arg value='core/target/test-classes:test/target/test-classes:lib/jruby.jar:maven/jruby-stdlib/target/jruby-stdlib-1.7.20-SNAPSHOT.jar'/>
<arg value='org.jruby.Main'/>
<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>
<arg value='-r./test/ruby19_env.rb'/>
@@ -461,7 +461,7 @@ build jruby-complete.jar
<env key='GEM_PATH' value='lib/ruby/gems/shared'/>
<arg value='-Djruby.home=uri:classloader://META-INF/jruby.home'/>
<arg value='-cp'/>
<arg value='core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-1.7.19-SNAPSHOT.jar'/>
<arg value='core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-1.7.20-SNAPSHOT.jar'/>
<arg value='org.jruby.Main'/>
<arg value='-I.:test/externals/ruby1.9:test/externals/ruby1.9/ruby'/>
<arg value='-r./test/ruby19_env.rb'/>
@@ -515,4 +515,4 @@ build jruby-complete.jar
<!--arg value='-v'/-->
</exec>
</target>
<target description='test using jruby-complete or jruby-core/jruby-stdlib jars' name='test-jruby-jars' depends='mvn,test-jruby-jars-jruby.1.9,test-jruby-complete-slow,test-jruby-jars-objectspace,test-jruby-jars-mri.1.9,test-jruby-complete-rubicon.1.9'/></project>
<target description='test using jruby-complete or jruby-core/jruby-stdlib jars' name='test-jruby-jars' depends='mvn,test-jruby-jars-jruby.1.9,test-jruby-complete-slow,test-jruby-jars-objectspace,test-jruby-jars-mri.1.9,test-jruby-complete-rubicon.1.9'/></project>
1,337 changes: 1,264 additions & 73 deletions core/src/main/java/org/jruby/RubyString.java

Large diffs are not rendered by default.

27 changes: 25 additions & 2 deletions core/src/main/java/org/jruby/RubyStruct.java
Original file line number Diff line number Diff line change
@@ -547,13 +547,22 @@ public IRubyObject call(IRubyObject obj, boolean recur) {
private IRubyObject inspectStruct(final ThreadContext context, boolean recur) {
Ruby runtime = context.runtime;
RubyArray member = __member__();
<<<<<<< HEAD
ByteList buffer = new ByteList("#<struct ".getBytes());
String cpath = getMetaClass().getRealClass().getName();
char first = cpath.charAt(0);

if (recur || first != '#') {
buffer.append(cpath.getBytes());
buffer.append(' ');
=======
RubyString buffer = RubyString.newString(getRuntime(), new ByteList("#<struct ".getBytes()));

if (is1_8() || getMetaClass().getRealClass().getBaseName() != null) {
String className = getMetaClass().getRealClass().getRealClass().getName();
buffer.append(RubyString.newString(getRuntime(), new ByteList(className.getBytes())));
buffer.cat(' ');
>>>>>>> jruby-1_7
}

if (recur) {
@@ -562,6 +571,7 @@ private IRubyObject inspectStruct(final ThreadContext context, boolean recur) {
}

for (int i = 0,k=member.getLength(); i < k; i++) {
<<<<<<< HEAD
if (i > 0) {
buffer.append(',').append(' ');
}
@@ -574,10 +584,23 @@ private IRubyObject inspectStruct(final ThreadContext context, boolean recur) {
}
buffer.append('=');
buffer.append(inspect(context, values[i]).getByteList());
=======
if (i > 0) buffer.cat(',').cat(' ');
// FIXME: MRI has special case for constants here
if (is1_8()) {
buffer.cat(RubyString.objAsString(context, member.eltInternal(i)));
buffer.cat('=');
buffer.cat(inspect(context, values[i]));
} else {
buffer.cat19(RubyString.objAsString(context, member.eltInternal(i)));
buffer.cat('=');
buffer.cat19(inspect(context, values[i]));
}
>>>>>>> jruby-1_7
}

buffer.append('>');
return getRuntime().newString(buffer); // OBJ_INFECT
buffer.cat('>');
return buffer.dup(); // OBJ_INFECT
}

@JRubyMethod(name = {"inspect", "to_s"})
15 changes: 12 additions & 3 deletions core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java
Original file line number Diff line number Diff line change
@@ -929,9 +929,18 @@ public IRubyObject op_div(ThreadContext context, IRubyObject other, IRubyObject
// MRI behavior: "If digits is 0, the result is the same as the / operator."
if (scale == 0) return op_quo(context, other);

MathContext mathContext = new MathContext(scale, getRoundingMode(context.runtime));
return new RubyBigDecimal(context.runtime,
value.divide(val.value, mathContext)).setResult(scale);
if (isZero()) {
return newZero(getRuntime(), zeroSign * val.value.signum());
}

if (scale == 0) {
// MRI behavior: "If digits is 0, the result is the same as the / operator."
return op_quo(context, other);
} else {
MathContext mathContext = new MathContext(scale, getRoundingMode(context.runtime));
return new RubyBigDecimal(getRuntime(),
value.divide(val.value, mathContext)).setResult(scale);
}
}

@JRubyMethod(name = "div")
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package org.jruby.embed;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;

import java.net.URL;
import java.net.URLClassLoader;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

public class IsolatedScriptingContainerTest {

static ClassLoader cl;

@BeforeClass
public static void setupClassLoader() {
cl = Thread.currentThread().getContextClassLoader();
// make sure we have classloader which does not find jruby
ClassLoader c = new URLClassLoader( new URL[] {}, null );
try {
c.loadClass( "org.jruby.embed.ScriptingContainer" );
fail( "this classloader shall not find jruby" );
}
catch( ClassNotFoundException expected){}
// set it as context classloader
Thread.currentThread().setContextClassLoader( c );
}

@AfterClass
public static void restClassLoader() {
Thread.currentThread().setContextClassLoader( cl );
}

@Test
public void testIsolatedScriptingContainer() throws Exception {
// we do have an instance of "jruby" loaded via some other classloader
//System.setProperty("jruby.debug.loadService", "true");
ScriptingContainer instance = new IsolatedScriptingContainer();
String result = instance.runScriptlet( "$LOAD_PATH" ).toString();
assertNotNull(result);

assertEquals(instance.runScriptlet("JRuby.runtime.jruby_class_loader.parent" ), cl );
assertEquals(ScriptingContainer.class.getClassLoader(), cl);
}
}
9 changes: 9 additions & 0 deletions core/src/test/resources/rubygems/defaults/jruby.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# dummy to run IsolatedScriptingContainerTest
module Gem
class Specification
def self.reset
end
def self.add_dir *args
end
end
end
2 changes: 1 addition & 1 deletion ext/pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.0.0.0.pre1</version>
<version>9.0.0.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-ext</artifactId>
<packaging>pom</packaging>
2 changes: 1 addition & 1 deletion ext/ripper/pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-ext</artifactId>
<version>9.0.0.0.pre1</version>
<version>9.0.0.0-SNAPSHOT</version>
</parent>
<groupId>rubygems</groupId>
<artifactId>jruby-ripper</artifactId>
1 change: 1 addition & 0 deletions maven/jruby/src/it/j2ee_jetty_rack/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pkg
4 changes: 4 additions & 0 deletions maven/jruby/src/it/j2ee_jetty_rack/.jrubydir
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.
config.ru
gems
specifications
80 changes: 80 additions & 0 deletions maven/jruby/src/it/j2ee_jetty_rack/Mavenfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#-*- mode: ruby -*-

# it is war-file
packaging 'war'

# get jruby dependencies
properties( 'jruby.version' => '@project.version@',
'jruby.plugins.version' => '1.0.7',
'project.build.sourceEncoding' => 'utf-8',
'public.dir' => '${basedir}/public' )

pom( 'org.jruby:jruby', '${jruby.version}' )

jar( 'org.jruby.rack:jruby-rack', '1.1.18',
:exclusions => [ 'org.jruby:jruby-complete' ] )


# ruby-maven will dump an equivalent pom.xml
properties[ 'tesla.dump.pom' ] = 'pom.xml'

# a gem to be used
gem 'flickraw', '0.9.7'

repository( :url => 'http://rubygems-proxy.torquebox.org/releases',
:id => 'rubygems-releases' )

jruby_plugin :gem, :includeRubygemsInResources => true, :includeLibDirectoryInResources => true do
execute_goal :initialize
end

# not really needed but for completeness:
# pack the war with that ruby-like directory layout
plugin( :war, '2.2',
:warSourceDirectory => '${public.dir}' )

resource :directory => '${basedir}', :includes => [ 'config.ru', '.jrubydir' ]

# start jetty for the tests
plugin( 'org.eclipse.jetty:jetty-maven-plugin', '9.1.3.v20140225',
:path => '/',
:webAppSourceDirectory => '${public.dir}',
:stopPort => 9999,
:stopKey => 'foo' ) do
execute_goal( 'start', :id => 'start jetty', :phase => 'pre-integration-test', :daemon => true )
execute_goal( 'stop', :id => 'stop jetty', :phase => 'post-integration-test' )
end

# download files during the tests
result = nil
execute 'download', :phase => 'integration-test' do
require 'open-uri'
result = open( 'http://localhost:8080' ).string
puts result
end

# verify the downloads
execute 'check download', :phase => :verify do
expected = 'hello world:'
unless result.match( /^#{expected}/ )
raise "missed expected string in download: #{expected}"
end
expected = 'self: uri:classloader://config.ru'
unless result.match( /#{expected}/ )
raise "missed expected string in download: #{expected}"
end
expected = 'PWD: uri:classloader://'
unless result.match( /#{expected}/ )
raise "missed expected string in download: #{expected}"
end
expected = 'Gem.path: ."uri:classloader://",'
unless result.match( /#{expected}/ )
raise "missed expected string in download: #{expected}"
end
# TODO get rid off this over normalization
expected = 'uri:classloader:/gems/flickraw-0.9.7'
unless result.match( /#{expected}/ )
raise "missed expected string in download: #{expected}"
end
end
# vim: syntax=Ruby
19 changes: 19 additions & 0 deletions maven/jruby/src/it/j2ee_jetty_rack/config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#-*- mode: ruby -*-

use Rack::ShowExceptions

require 'hello_world'

run lambda { |env|
require 'flickraw'
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
[ "self: #{__FILE__}\n", "PWD: #{Dir.pwd}\n", "Gem.path: #{Gem.path.inspect}\n", Gem.loaded_specs['flickraw'].gem_dir + "\n", HelloWorld.new + "\n" ]
]
}

# vim: syntax=Ruby
7 changes: 7 additions & 0 deletions maven/jruby/src/it/j2ee_jetty_rack/lib/hello_world.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'openssl'

class HelloWorld < String
def initialize
super "hello world: #{OpenSSL::Random.random_bytes( 16 ).inspect}"
end
end
151 changes: 151 additions & 0 deletions maven/jruby/src/it/j2ee_jetty_rack/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>no_group_id_given</groupId>
<artifactId>j2ee_jetty_rack</artifactId>
<version>0.0.0</version>
<packaging>war</packaging>
<name>j2ee_jetty_rack</name>
<properties>
<jruby.version>@project.version@</jruby.version>
<jruby.plugins.version>1.0.7</jruby.plugins.version>
<tesla.dump.pom>pom.xml</tesla.dump.pom>
<public.dir>${basedir}/public</public.dir>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<tesla.version>0.1.1</tesla.version>
</properties>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
<version>${jruby.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jruby.rack</groupId>
<artifactId>jruby-rack</artifactId>
<version>1.1.18</version>
<exclusions>
<exclusion>
<artifactId>jruby-complete</artifactId>
<groupId>org.jruby</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>flickraw</artifactId>
<version>0.9.7</version>
<type>gem</type>
</dependency>
</dependencies>
<repositories>
<repository>
<id>rubygems-releases</id>
<url>http://rubygems-proxy.torquebox.org/releases</url>
</repository>
</repositories>
<build>
<resources>
<resource>
<directory>${basedir}</directory>
<includes>
<include>config.ru</include>
<include>.jrubydir</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>de.saumya.mojo</groupId>
<artifactId>gem-maven-plugin</artifactId>
<version>${jruby.plugins.version}</version>
<executions>
<execution>
<goals>
<goal>initialize</goal>
</goals>
</execution>
</executions>
<configuration>
<includeRubygemsInResources>true</includeRubygemsInResources>
<includeLibDirectoryInResources>true</includeLibDirectoryInResources>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<warSourceDirectory>${public.dir}</warSourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.1.3.v20140225</version>
<executions>
<execution>
<id>start jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
<configuration>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
<configuration>
<path>/</path>
<webAppSourceDirectory>${public.dir}</webAppSourceDirectory>
<stopPort>9999</stopPort>
<stopKey>foo</stopKey>
</configuration>
</plugin>
<plugin>
<groupId>io.tesla.polyglot</groupId>
<artifactId>tesla-polyglot-maven-plugin</artifactId>
<version>${tesla.version}</version>
<executions>
<execution>
<id>download</id>
<phase>integration-test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<taskId>download</taskId>
<nativePom>Mavenfile</nativePom>
</configuration>
</execution>
<execution>
<id>check download</id>
<phase>verify</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<taskId>check download</taskId>
<nativePom>Mavenfile</nativePom>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.tesla.polyglot</groupId>
<artifactId>tesla-polyglot-ruby</artifactId>
<version>${tesla.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
2 changes: 2 additions & 0 deletions maven/jruby/src/it/j2ee_jetty_rack/public/WEB-INF/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
classes
config.ru
22 changes: 22 additions & 0 deletions maven/jruby/src/it/j2ee_jetty_rack/public/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>jruby.rack.layout_class</param-name>
<param-value>JRuby::Rack::ClassPathLayout</param-value>
</context-param>

<filter>
<filter-name>RackFilter</filter-name>
<filter-class>org.jruby.rack.RackFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>RackFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<listener>
<listener-class>org.jruby.rack.RackServletContextListener</listener-class>
</listener>
</web-app>
1 change: 1 addition & 0 deletions maven/jruby/src/it/j2ee_tomcat_rack/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pkg
4 changes: 4 additions & 0 deletions maven/jruby/src/it/j2ee_tomcat_rack/.jrubydir
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.
config.ru
gems
specifications
83 changes: 83 additions & 0 deletions maven/jruby/src/it/j2ee_tomcat_rack/Mavenfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#-*- mode: ruby -*-

# it is war-file
packaging 'war'

# get jruby dependencies
properties( 'jruby.version' => '@project.version@',
'jruby.home' => '../../../../../',
'jruby.plugins.version' => '1.0.3',
'project.build.sourceEncoding' => 'utf-8',
'public.dir' => '${basedir}/public' )

pom( 'org.jruby:jruby', '${jruby.version}' )

jar( 'org.jruby.rack:jruby-rack', '1.1.18',
:exclusions => [ 'org.jruby:jruby-complete' ] )


# ruby-maven will dump an equivalent pom.xml
properties[ 'tesla.dump.pom' ] = 'pom.xml'

# a gem to be used
gem 'flickraw', '0.9.7'

repository( :url => 'http://rubygems-proxy.torquebox.org/releases',
:id => 'rubygems-releases' )

jruby_plugin :gem, :includeRubygemsInResources => true, :includeLibDirectoryInResources => true do
execute_goal :initialize
end

# not really needed but for completeness:
# pack the war with that ruby-like directory layout
plugin( :war, '2.2',
:warSourceDirectory => '${public.dir}' )

resource :directory => '${basedir}', :includes => [ 'config.ru', '.jrubydir' ]

# start tomcat for the tests
plugin( 'org.codehaus.mojo:tomcat-maven-plugin', '1.1',
:fork => true, :path => '/',
:warSourceDirectory => '${public.dir}' ) do
execute_goals( 'run',
:id => 'run-tomcat',
:phase => 'pre-integration-test' )
end

# download files during the tests
execute 'download', :phase => 'integration-test' do
require 'open-uri'
result = open( 'http://localhost:8080' ).string
File.open( 'result', 'w' ) { |f| f.puts result }
puts result
end

# verify the downloads
execute 'check download', :phase => :verify do
result = File.read( 'result' )
expected = 'hello world:'
unless result.match( /^#{expected}/ )
raise "missed expected string in download: #{expected}"
end
expected = 'self: uri:classloader://config.ru'
unless result.match( /#{expected}/ )
raise "missed expected string in download: #{expected}"
end
expected = 'PWD: uri:classloader://'
unless result.match( /#{expected}/ )
raise "missed expected string in download: #{expected}"
end
expected = 'Gem.path: ."uri:classloader://",'
unless result.match( /#{expected}/ )
raise "missed expected string in download: #{expected}"
end
# TODO get rid off this over normalization
#expected = 'uri:classloader:/gems/flickraw-0.9.7'
# TODO find out why travis find the gem on filesystem
expected = 'target/classes/gems/flickraw-0.9.7'
unless result.match( /#{expected}/ )
raise "missed expected string in download: #{expected}"
end
end
# vim: syntax=Ruby
19 changes: 19 additions & 0 deletions maven/jruby/src/it/j2ee_tomcat_rack/config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#-*- mode: ruby -*-

use Rack::ShowExceptions

require 'hello_world'

run lambda { |env|
require 'flickraw'
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
[ "self: #{__FILE__}\n", "PWD: #{Dir.pwd}\n", "Gem.path: #{Gem.path.inspect}\n","Gem::Specification.dirs: #{Gem::Specification.dirs.inspect}\n", Gem.loaded_specs['flickraw'].gem_dir + "\n", HelloWorld.new + "\n" ]
]
}

# vim: syntax=Ruby
7 changes: 7 additions & 0 deletions maven/jruby/src/it/j2ee_tomcat_rack/lib/hello_world.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'openssl'

class HelloWorld < String
def initialize
super "hello world: #{OpenSSL::Random.random_bytes( 16 ).inspect}"
end
end
141 changes: 141 additions & 0 deletions maven/jruby/src/it/j2ee_tomcat_rack/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>no_group_id_given</groupId>
<artifactId>j2ee_tomcat_rack</artifactId>
<version>0.0.0</version>
<packaging>war</packaging>
<name>j2ee_tomcat_rack</name>
<properties>
<jruby.home>../../../../../</jruby.home>
<jruby.version>@project.version@</jruby.version>
<jruby.plugins.version>1.0.3</jruby.plugins.version>
<tesla.dump.pom>pom.xml</tesla.dump.pom>
<public.dir>${basedir}/public</public.dir>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<tesla.version>0.1.1</tesla.version>
</properties>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
<version>${jruby.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jruby.rack</groupId>
<artifactId>jruby-rack</artifactId>
<version>1.1.18</version>
<exclusions>
<exclusion>
<artifactId>jruby-complete</artifactId>
<groupId>org.jruby</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>flickraw</artifactId>
<version>0.9.7</version>
<type>gem</type>
</dependency>
</dependencies>
<repositories>
<repository>
<id>rubygems-releases</id>
<url>http://rubygems-proxy.torquebox.org/releases</url>
</repository>
</repositories>
<build>
<resources>
<resource>
<directory>${basedir}</directory>
<includes>
<include>config.ru</include>
<include>.jrubydir</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>de.saumya.mojo</groupId>
<artifactId>gem-maven-plugin</artifactId>
<version>${jruby.plugins.version}</version>
<executions>
<execution>
<goals>
<goal>initialize</goal>
</goals>
</execution>
</executions>
<configuration>
<includeRubygemsInResources>true</includeRubygemsInResources>
<includeLibDirectoryInResources>true</includeLibDirectoryInResources>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<warSourceDirectory>${public.dir}</warSourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>run-tomcat</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<configuration>
<fork>true</fork>
<path>/</path>
<warSourceDirectory>${public.dir}</warSourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>io.tesla.polyglot</groupId>
<artifactId>tesla-polyglot-maven-plugin</artifactId>
<version>${tesla.version}</version>
<executions>
<execution>
<id>download</id>
<phase>integration-test</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<taskId>download</taskId>
<nativePom>Mavenfile</nativePom>
</configuration>
</execution>
<execution>
<id>check download</id>
<phase>verify</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<taskId>check download</taskId>
<nativePom>Mavenfile</nativePom>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.tesla.polyglot</groupId>
<artifactId>tesla-polyglot-ruby</artifactId>
<version>${tesla.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
2 changes: 2 additions & 0 deletions maven/jruby/src/it/j2ee_tomcat_rack/public/WEB-INF/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
classes
config.ru
22 changes: 22 additions & 0 deletions maven/jruby/src/it/j2ee_tomcat_rack/public/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<context-param>
<param-name>jruby.rack.layout_class</param-name>
<param-value>JRuby::Rack::ClassPathLayout</param-value>
</context-param>

<filter>
<filter-name>RackFilter</filter-name>
<filter-class>org.jruby.rack.RackFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>RackFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<listener>
<listener-class>org.jruby.rack.RackServletContextListener</listener-class>
</listener>
</web-app>
5 changes: 4 additions & 1 deletion maven/jruby/src/it/runnable/Mavenfile
Original file line number Diff line number Diff line change
@@ -40,7 +40,10 @@ build do
directory 'pkg'
end

jruby_plugin!( :gem, :includeRubygemsInResources => true )
jruby_plugin!( :gem, '1.0.8',
# need a jruby-complete from maven central here
:jrubyVersion => '1.7.19',
:includeRubygemsInResources => true )

if File.file?('Jarfile.lock')
phase :package do
335 changes: 335 additions & 0 deletions maven/jruby/src/it/runnable/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,335 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>no_group_id_given</groupId>
<artifactId>runnable</artifactId>
<version>0.0.0</version>
<name>runnable</name>
<properties>
<tesla.dump.readOnly>true</tesla.dump.readOnly>
<jruby.version>@project.version@</jruby.version>
<jruby.plugins.version>1.0.3</jruby.plugins.version>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<tesla.dump.pom>pom.xml</tesla.dump.pom>
<tesla.version>0.1.1</tesla.version>
</properties>
<dependencies>
<dependency>
<groupId>rubygems</groupId>
<artifactId>bundler</artifactId>
<version>1.7.7</version>
<type>gem</type>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
<version>${jruby.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<repositories>
<repository>
<id>rubygems-releases</id>
<url>http://rubygems-proxy.torquebox.org/releases</url>
</repository>
</repositories>
<build>
<resources>
<resource>
<directory>${basedir}</directory>
<includes>
<include>config.ru</include>
<include>*file</include>
<include>*file.lock</include>
<include>.jbundler/classpath.rb</include>
<include>lib/**</include>
<include>app/**</include>
<include>config/**</include>
<include>vendor/**</include>
<include>spec/**</include>
</includes>
</resource>
<resource>
<targetPath>META-INF/jruby.home/bin</targetPath>
<directory>${project.build.directory}/rubygems/bin</directory>
<includes>
<include>*</include>
</includes>
</resource>
</resources>
<directory>pkg</directory>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>.</outputDirectory>
<finalName>runnable</finalName>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4</version>
<configuration>
<filesets>
<fileset>
<directory>.</directory>
<includes>
<include>runnable.jar</include>
<include>*/**/*.jar</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>de.saumya.mojo</groupId>
<artifactId>gem-maven-plugin</artifactId>
<version>${jruby.plugins.version}</version>
<executions>
<execution>
<id>install gems</id>
<goals>
<goal>initialize</goal>
</goals>
</execution>
</executions>
<configuration>
<jrubyVersion>1.7.19</jrubyVersion>
<includeRubygemsInResources>true</includeRubygemsInResources>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy jar dependencies</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<type>jar</type>
<version>1.49</version>
<classifier />
<outputDirectory>${project.build.outputDirectory}/org/bouncycastle/bcpkix-jdk15on/1.49</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<type>jar</type>
<version>1.6.4</version>
<classifier />
<outputDirectory>${project.build.outputDirectory}/org/slf4j/slf4j-simple/1.6.4</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<type>jar</type>
<version>1.49</version>
<classifier />
<outputDirectory>${project.build.outputDirectory}/org/bouncycastle/bcprov-jdk15on/1.49</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<type>jar</type>
<version>1.6.4</version>
<classifier />
<outputDirectory>${project.build.outputDirectory}/org/slf4j/slf4j-api/1.6.4</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>pack</id>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>rubygems:*</exclude>
</excludes>
</artifactSet>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>rake -T</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<arguments>
<argument>-jar</argument>
<argument>runnable.jar</argument>
<argument>-S</argument>
<argument>rake</argument>
<argument>-T</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>rspec</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<arguments>
<argument>-jar</argument>
<argument>runnable.jar</argument>
<argument>-S</argument>
<argument>rspec</argument>
</arguments>
</configuration>
</execution>
</executions>
<configuration>
<executable>java</executable>
<environmentVariables>
<PATH>${basedir}</PATH>
<HOME>${basedir}</HOME>
<GEM_PATH>${basedir}</GEM_PATH>
<GEM_HOME>${basedir}</GEM_HOME>
</environmentVariables>
</configuration>
</plugin>
<plugin>
<groupId>io.tesla.polyglot</groupId>
<artifactId>tesla-polyglot-maven-plugin</artifactId>
<version>${tesla.version}</version>
<executions>
<execution>
<id>create jrubydir info</id>
<phase>process-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<taskId>create jrubydir info</taskId>
<nativePom>Mavenfile</nativePom>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.tesla.polyglot</groupId>
<artifactId>tesla-polyglot-ruby</artifactId>
<version>${tesla.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>gemfile</id>
<activation>
<file>
<missing>Gemfile.lock</missing>
</file>
</activation>
<dependencies>
<dependency>
<groupId>rubygems</groupId>
<artifactId>rspec</artifactId>
<version>[2.14,2.99999]</version>
<type>gem</type>
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>rake</artifactId>
<version>[10.3,10.99999]</version>
<type>gem</type>
</dependency>
<dependency>
<groupId>rubygems</groupId>
<artifactId>jbundler</artifactId>
<version>0.7.1</version>
<type>gem</type>
</dependency>
</dependencies>
</profile>
<profile>
<id>gemfile_lock</id>
<activation>
<file>
<exists>Gemfile.lock</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>de.saumya.mojo</groupId>
<artifactId>gem-maven-plugin</artifactId>
<version>${jruby.plugins.version}</version>
<executions>
<execution>
<id>install gem sets for compile</id>
<phase>initialize</phase>
<goals>
<goal>sets</goal>
</goals>
<configuration>
<scope>compile</scope>
<gems>
<rspec>2.99.0</rspec>
<rspec-core>2.99.2</rspec-core>
<rspec-expectations>2.99.2</rspec-expectations>
<diff-lcs>1.2.5</diff-lcs>
<rspec-mocks>2.99.2</rspec-mocks>
<rake>10.3.2</rake>
<jbundler>0.7.1</jbundler>
<jar-dependencies>0.1.7</jar-dependencies>
<maven-tools>1.0.7</maven-tools>
<virtus>1.0.3</virtus>
<axiom-types>0.1.1</axiom-types>
<descendants_tracker>0.0.4</descendants_tracker>
<thread_safe>0.3.4</thread_safe>
<ice_nine>0.11.0</ice_nine>
<coercible>1.0.0</coercible>
<equalizer>0.0.9</equalizer>
<ruby-maven>3.1.1.0.8</ruby-maven>
<ruby-maven-libs>3.1.1</ruby-maven-libs>
</gems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
2 changes: 1 addition & 1 deletion maven/jruby/src/it/runnable/spec/one_spec.rb
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
describe "something" do
it "does something" do
$CLASSPATH.size.should == 4
Jars.home.should == 'uri:classloader://'
Jars.home.should == 'uri:classloader:/'
Dir.pwd.should == 'uri:classloader://'
$LOAD_PATH.each do |lp|
lp.should =~ /^uri:classloader:|runnable.jar!\//
4 changes: 2 additions & 2 deletions maven/jruby/src/it/runnable/src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -30,9 +30,9 @@ private Main(org.jruby.RubyInstanceConfig config) {
config.setHardExit(true);
config.setCurrentDirectory( "uri:classloader://" );
config.setJRubyHome( "uri:classloader://META-INF/jruby.home" );
config.setLoadPaths( java.util.Arrays.asList("uri:classloader://") );
config.setLoadPaths( java.util.Arrays.asList("uri:classloader:/") );
java.util.Map env = new java.util.HashMap( System.getenv() );
env.put( "JARS_HOME", "uri:classloader://" );
env.put( "JARS_HOME", "uri:classloader:/" );
// needed for jruby version before 1.7.19
env.put( "BUNDLE_DISABLE_SHARED_GEMS", "true" );
config.setEnvironment( env );
3 changes: 2 additions & 1 deletion rakelib/test.rake
Original file line number Diff line number Diff line change
@@ -107,7 +107,8 @@ namespace :test do
end
t.test_files = files
t.verbose = true
t.ruby_opts << '-J-ea'
t.test_files = files_in_file 'test/slow.index'
t.ruby_opts << '-J-ea' << '--1.8'
t.ruby_opts << '-J-cp target/test-classes'
end

24 changes: 24 additions & 0 deletions spec/regression/GH-2182_struct_inspect_has_ascii_encoding_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- encoding: utf-8 -*-

# https://github.com/jruby/jruby/issues/2182
if RUBY_VERSION > '1.9'
describe 'Struct#inspect' do
it 'returns correct value' do
s1 = Struct.new(:aa).new("ΆἅἇἈ")
s1.inspect.should == "#<struct aa=\"ΆἅἇἈ\">"
s1.inspect.encoding.should == Encoding::UTF_8

s2 = Struct.new(:a, :b).new("ΆἅἇἈ", "abc")
s2.inspect.should == "#<struct a=\"ΆἅἇἈ\", b=\"abc\">"
s2.inspect.encoding.should == Encoding::UTF_8

s3 = Struct.new(:b).new("abc")
s3.inspect.should == "#<struct b=\"abc\">"
s3.inspect.encoding.should == Encoding::ASCII_8BIT

s4 = Struct.new(:"ΆἅἇἈ").new("aa")
s4.inspect.should == "#<struct ΆἅἇἈ=\"aa\">"
s4.inspect.encoding.should == Encoding::UTF_8
end
end
end
Original file line number Diff line number Diff line change
@@ -9,4 +9,3 @@
expect(r1).to eq(r2)
end
end

26 changes: 25 additions & 1 deletion test/jruby/test_primitive_to_java.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
# encoding: UTF-8
require 'test/unit'
require 'java'

class TestPrimitiveToJava < Test::Unit::TestCase

def setup; super; require 'java' end

def test_primitive_conversion
t = Time.now
date = t.to_java(java.util.Date)

assert_equal(t.to_i, date.time / 1000, "Ruby time #{t} not converted to java date correctly: #{date}")
end

def test_char_conversion
str = 'a'
char = str.to_java(:char)
assert_instance_of Java::JavaLang::Character, char

str = ' '
char = str.to_java(Java::char)
assert_equal 32, char.charValue

str = '0'
char = str.to_java(java.lang.Character)
assert_equal 48.to_java(:char), char

assert_equal 228, 'ä'.to_java(:char).charValue unless RUBY_VERSION.index('1.8') == 0

assert_raises(ArgumentError) { ''.to_java(:char) }
assert_raises(ArgumentError) { 'už'.to_java('java.lang.Character') }
'už'[1].to_java('java.lang.Character') unless RUBY_VERSION.index('1.8') == 0
end

end
16 changes: 8 additions & 8 deletions test/pom.xml
Original file line number Diff line number Diff line change
@@ -240,7 +240,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="${jruby.home}/bin/jruby">
<exec dir="${jruby.home}" executable="${jruby.home}/bin/jruby" failonerror="true">
<env value="" key="JRUBY_OPTS" />
<arg value="-S" />
<arg value="rake" />
@@ -269,7 +269,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="java">
<exec dir="${jruby.home}" executable="java" failonerror="true">
<arg value="-cp" />
<arg value="core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-${project.version}.jar" />
<arg value="org.jruby.Main" />
@@ -510,7 +510,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="java">
<exec dir="${jruby.home}" executable="java" failonerror="true">
<arg value="-cp" />
<arg value="core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-${project.version}.jar" />
<arg value="org.jruby.Main" />
@@ -628,7 +628,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="java">
<exec dir="${jruby.home}" executable="java" failonerror="true">
<arg value="-cp" />
<arg value="core/target/test-classes:test/target/test-classes:maven/jruby-complete/target/jruby-complete-${project.version}.jar" />
<arg value="org.jruby.Main" />
@@ -673,7 +673,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="${jruby.home}/bin/jruby">
<exec dir="${jruby.home}" executable="${jruby.home}/bin/jruby" failonerror="true">
<arg value="-X+T" />
<arg value="-Xparser.warn.useless_use_of=false" />
<arg value="-Xparser.warn.not_reached=false" />
@@ -716,7 +716,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="${jruby.home}/bin/jruby">
<exec dir="${jruby.home}" executable="${jruby.home}/bin/jruby" failonerror="true">
<arg value="-X+T" />
<arg value="-Xparser.warn.useless_use_of=false" />
<arg value="-Xparser.warn.not_reached=false" />
@@ -761,7 +761,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="${jruby.home}/bin/jruby">
<exec dir="${jruby.home}" executable="${jruby.home}/bin/jruby" failonerror="true">
<arg value="-X+T" />
<arg value="-Xparser.warn.useless_use_of=false" />
<arg value="-Xparser.warn.not_reached=false" />
@@ -806,7 +806,7 @@
</goals>
<configuration>
<target>
<exec failonerror="true" dir="${jruby.home}" executable="${jruby.home}/bin/jruby">
<exec dir="${jruby.home}" executable="${jruby.home}/bin/jruby" failonerror="true">
<arg value="-J-server" />
<arg value="-J-G:+TruffleCompilationExceptionsAreThrown" />
<arg value="-X+T" />
2 changes: 1 addition & 1 deletion test/test_adding_pem_to_x509store.rb
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ def test_adding_pem
OpenSSL.debug = true
# mimic what rubygems/request#add_rubygems_trusted_certs does
# to find the pem certificates
p base = $LOAD_PATH.detect { |p| p =~ /ruby\/shared/ }
base = $LOAD_PATH.detect { |p| p =~ /ruby\/shared/ }
pems = Dir[ File.join(base, 'rubygems/ssl_certs/*pem') ]
assert_equal( 9, pems.size )
pems.each do |pem|

0 comments on commit e3d93f2

Please sign in to comment.