Skip to content

Commit

Permalink
Merge branch 'master' into ruboto_9k
Browse files Browse the repository at this point in the history
headius committed Jun 13, 2017
2 parents 41b1cda + c8561db commit ded9644
Showing 254 changed files with 15,361 additions and 10,425 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -64,7 +64,6 @@ lib/ruby/stdlib/openssl*
lib/ruby/stdlib/org/
lib/ruby/stdlib/ripper.jar
lib/ruby/stdlib/rubygems/defaults/jruby_native.rb
lib/ruby/stdlib/racc*
lib/ruby/stdlib/rake*
lib/ruby/stdlib/json*
lib/ruby/stdlib/rdoc*
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@ cache:
before_install:
- rm ~/.m2/settings.xml
- export MAVEN_SKIP_RC=true
- mvn -Xmx32M -v | grep 1.7.0; if [ $? = 0 ]; then export MAVEN_OPTS="-XX:MaxPermSize=200M"; else export MAVEN_OPTS="-XX:MaxMetaspaceSize=200M -XX:CompressedClassSpaceSize=200M"; fi
- export MAVEN_OPTS="-Xmx512M $MAVEN_OPTS"
- mvn -Xmx32M -v | grep 1.7.0; if [ $? = 0 ]; then export MAVEN_OPTS="-XX:MaxPermSize=180M"; else export MAVEN_OPTS="-XX:MaxMetaspaceSize=180M -XX:CompressedClassSpaceSize=180M"; fi
- export MAVEN_OPTS="-Xmx500M $MAVEN_OPTS"

before_script:
- unset GEM_PATH GEM_HOME IRBRC JRUBY_OPTS
@@ -28,7 +28,7 @@ os:

env:
global:
- JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmn48M -Xmx512M"
- JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmn36M -Xmx512M -Djava.security.egd=file:/dev/./urandom"
- MALLOC_ARENA_MAX=2
matrix:
- PHASE='-Ptest'
@@ -76,8 +76,8 @@ matrix:
- env: COMMAND=test/check_versions.sh
jdk: oraclejdk8
allow_failures:
- env: PHASE='-Pj2ee'
jdk: oraclejdk7
#- env: PHASE='-Pj2ee'
# jdk: oraclejdk7
# NOTE: build seems to never start (waited for any to finish for more than a day) - probably a travis-ci bug
#- env: PHASE='-Pmain'
# sudo: required
154 changes: 65 additions & 89 deletions COPYING
Original file line number Diff line number Diff line change
@@ -9,6 +9,10 @@ and/or modify it under the terms of the:
GNU Lesser General Public License version 2.1

bytelist (http://github.com/jruby/bytelist),
jnr-posix (https://github.com/jnr/jnr-posix),
jruby-openssl (https://github.com/jruby/jruby-openssl),
jruby-readline (https://github.com/jruby/jruby-readline),
psych (https://github.com/ruby/psych),
yydebug (http://svn.codehaus.org/jruby/trunk/jay/yydebug)
are released under the same copyright/license.

@@ -32,30 +36,64 @@ below. Also see LICENSE.RUBY for most files found in lib/ruby/stdlib.

prototype.js is Copyright (c) 2005-2007 Sam Stephenson.

asm (http://asm.objectweb.org) is distributed under the BSD license and is

Copyright (c) 2000-2011 INRIA, France Telecom
All rights reserved.

jline2 (https://github.com/jline/jline2) is distributed under the BSD license:

Copyright (c) 2002-2012, the original author or authors.
All rights reserved.

jzlib (http://www.jcraft.com/jzlib/) is distributed under the BSD license:

Copyright (c) 2000-2011 ymnk, JCraft,Inc. All rights reserved.

The "rake" library (http://rake.rubyforge.org/) is distributed under
the MIT license, and has the following copyright:

Copyright (c) 2003, 2004 Jim Weirich

asm (http://asm.objectweb.org) is distributed under the BSD license.

jcodings (http://github.com/jruby/jcodings) and
joni (http://github.com/jruby/joni) are distributed
under the MIT license.

maven (http://maven.apache.org/),
jnr-constants (http://github.com/jnr/jnr-constants),
joda-time (http://joda-time.sourceforge.net),
jffi (https://github.com/jnr/jffi),
jnr-ffi (https://github.com/jnr/jnr-jffi),
jnr-enxio (https://github.com/jnr/jnr-enxio),
jnr-unixsocket (https://github.com/jnr/jnr-unixsocket),
jnr-netdb (http://github.com/jnr/jnr-netdb), and
nailgun (http://martiansoftware.com/nailgun) are distributed under the
Apache License version 2.0.

Bouncycastle is released under the MIT license, and is Copyright (c)
2000 - 2006 The Legion Of The Bouncy Castle.
under the MIT license without copyright.

Bouncycastle is released under the MIT license:

Copyright (c) 2000 - 2006 The Legion Of The Bouncy Castle.

jnr-x86asm (https://github.com/jnr/jnr-x86asm) is distributed under the MIT
license with the following copyright:

Copyright (C) 2010 Wayne Meissner
Copyright (c) 2008-2009, Petr Kobalicek <kobalicek.petr@gmail.com>

The following libraries are redistributed under the Apache Software
License v2.0, available below.
invokebinder (https://github.com/headius/invokebinder)
jffi (https://github.com/jnr/jffi)
jitescript (https://github.com/qmx/jitescript)
jnr-constants (http://github.com/jnr/jnr-constants)
jnr-enxio (https://github.com/jnr/jnr-enxio)
jnr-ffi (https://github.com/jnr/jnr-jffi)
jnr-netdb (http://github.com/jnr/jnr-netdb)
jnr-unixsocket (https://github.com/jnr/jnr-unixsocket)
joda-time (http://joda-time.sourceforge.net)
maven (http://maven.apache.org/)
nailgun (http://martiansoftware.com/nailgun)
options (https://github.com/headius/options)
snakeyaml (https://github.com/asomov/snakeyaml)
unsafe-fences (https://github.com/headius/unsafe-fences)

racc (runtime only, https://github.com/tenderlove/racc) is
distributed under the same license terms as the Ruby standard
library. This includes all files under lib/ruby/stdlib/racc.
See LICENSE.RUBY.

json-generator and json-parser (https://github.com/flori/json) native
extenstions under the same license terms as the Ruby standard library.
See LICENSE.RUBY

The complete text of the Eclipse Public License is as follows:

@@ -1332,7 +1370,6 @@ Licenses listed below include:
* GNU General Public License version 3
* Apache 2.0 License
* BSD License
* Apache Software License Version 1.1
* MIT License

The complete text of the GNU General Public License version 3 is as follows:
@@ -2218,9 +2255,6 @@ The complete text of the Apache 2.0 License is as follows:

The complete text of the BSD license can be is as follows:

Copyright (c) The Regents of the University of California.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
@@ -2233,75 +2267,17 @@ The complete text of the BSD license can be is as follows:
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

The complete text of the Apache Software License Version 1.1 is as follows:

/*
* ================================================================
* The Apache Software License, Version 1.1
* ================================================================
*
* Copyright (C) 2000-2002 The Apache Software Foundation. All
* rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following
* conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowledgment: "This product
* includes software developed by the Apache Software Foundation
* (http://www.apache.org/)." Alternately, this acknowledgment may
* appear in the software itself, if and wherever such third-party
* acknowledgments normally appear.
*
* 4. The names "Ant" and "Apache Software Foundation" must not be
* used to endorse or promote products derived from this software
* without prior written permission. For written permission, please
* contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION
* OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.

The complete text of the MIT license is as follows:

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ For [`rbenv`](https://github.com/sstephenson/rbenv) you will need the
package manager can provide these. Then you can run:

```
$ rbenv install jruby-9.1.6.0
$ rbenv install jruby-9.1.10.0
```

For [`rvm`](https://rvm.io) you can simply do:
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9.1.9.0-SNAPSHOT
9.1.11.0-SNAPSHOT
4 changes: 2 additions & 2 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -46,9 +46,9 @@
jar 'com.github.jnr:jnr-enxio:0.16', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-x86asm:1.0.2', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-unixsocket:0.17', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-posix:3.0.38', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-posix:3.0.41', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-constants:0.9.9', :exclusions => ['com.github.jnr:jnr-ffi']
jar 'com.github.jnr:jnr-ffi:2.1.4'
jar 'com.github.jnr:jnr-ffi:2.1.6'
jar 'com.github.jnr:jffi:${jffi.version}'
jar 'com.github.jnr:jffi:${jffi.version}:native'

6 changes: 3 additions & 3 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ DO NOT MODIFIY - GENERATED CODE
<parent>
<groupId>org.jruby</groupId>
<artifactId>jruby-parent</artifactId>
<version>9.1.9.0-SNAPSHOT</version>
<version>9.1.11.0-SNAPSHOT</version>
</parent>
<artifactId>jruby-core</artifactId>
<name>JRuby Core</name>
@@ -135,7 +135,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-posix</artifactId>
<version>3.0.38</version>
<version>3.0.41</version>
<exclusions>
<exclusion>
<artifactId>jnr-ffi</artifactId>
@@ -157,7 +157,7 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-ffi</artifactId>
<version>2.1.4</version>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>com.github.jnr</groupId>
24 changes: 24 additions & 0 deletions core/src/main/java/org/jruby/Ruby.java
Original file line number Diff line number Diff line change
@@ -3125,6 +3125,26 @@ public IRubyObject pushExitBlock(RubyProc proc) {
return proc;
}

/**
* It is possible for looping or repeated execution to encounter the same END
* block multiple times. Rather than store extra runtime state we will just
* make sure it is not already registered. at_exit by contrast can push the
* same block many times (and should use pushExistBlock).
*/
public void pushEndBlock(RubyProc proc) {
if (alreadyRegisteredEndBlock(proc) != null) return;
pushExitBlock(proc);
}

private RubyProc alreadyRegisteredEndBlock(RubyProc newProc) {
Block block = newProc.getBlock();

for (RubyProc proc: atExitBlocks) {
if (block.equals(proc.getBlock())) return proc;
}
return null;
}

// use this for JRuby-internal finalizers
public void addInternalFinalizer(Finalizable finalizer) {
synchronized (internalFinalizersMutex) {
@@ -3693,6 +3713,10 @@ public RaiseException newErrnoENETUNREACHError() {
return newRaiseException(getErrno().getClass("ENETUNREACH"), null);
}

public RaiseException newErrnoEMSGSIZEError() {
return newRaiseException(getErrno().getClass("EMSGSIZE"), null);
}

public RaiseException newIndexError(String message) {
return newRaiseException(getIndexError(), message);
}
5 changes: 4 additions & 1 deletion core/src/main/java/org/jruby/RubyBasicObject.java
Original file line number Diff line number Diff line change
@@ -376,6 +376,10 @@ public final IRubyObject callMethod(String name, IRubyObject... args) {
return Helpers.invoke(getRuntime().getCurrentContext(), this, name, args);
}

public final IRubyObject callMethod(String name, IRubyObject arg) {
return Helpers.invoke(getRuntime().getCurrentContext(), this, name, arg);
}

public final IRubyObject callMethod(String name) {
return Helpers.invoke(getRuntime().getCurrentContext(), this, name);
}
@@ -2198,7 +2202,6 @@ public IRubyObject untaint(ThreadContext context) {
* from prog.rb:3
*/
public IRubyObject freeze(ThreadContext context) {
Ruby runtime = context.runtime;
if ((flags & FROZEN_F) == 0) {
flags |= FROZEN_F;
}
5 changes: 3 additions & 2 deletions core/src/main/java/org/jruby/RubyClass.java
Original file line number Diff line number Diff line change
@@ -197,8 +197,9 @@ public IRubyObject allocate(Ruby runtime, RubyClass klazz) {
* constructor (Ruby, RubyClass) on the given class via a static
* __allocate__ method intermediate.
*
* @param clazz The class from which to grab a standard Ruby __allocate__
* method.
* @param clazz The class from which to grab a standard Ruby __allocate__ method.
*
* @note Used with `jrubyc --java` generated (interoperability) class files.
*/
public void setRubyStaticAllocator(final Class<?> clazz) {
try {
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyDir.java
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ public class RubyDir extends RubyObject {

private final static Encoding UTF8 = UTF8Encoding.INSTANCE;

private static Pattern PROTOCOL_PATTERN = Pattern.compile("^(uri|jar|file|classpath):([^:]*:)?//?.*");
private static final Pattern PROTOCOL_PATTERN = Pattern.compile("^(uri|jar|file|classpath):([^:]*:)?//?.*");

public RubyDir(Ruby runtime, RubyClass type) {
super(runtime, type);
Loading

0 comments on commit ded9644

Please sign in to comment.