Skip to content

Commit 9ae5915

Browse files
committed
Merge remote-tracking branch 'origin/master' into wip_newinstance
2 parents ce66437 + 6e763ef commit 9ae5915

805 files changed

Lines changed: 11195 additions & 46783 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ lib/ruby/stdlib/cmath.rb
6262
lib/ruby/stdlib/csv*
6363
lib/ruby/stdlib/did_you_mean*
6464
lib/ruby/stdlib/e2mmap*
65+
lib/ruby/stdlib/ffi*
6566
lib/ruby/stdlib/fileutils.rb
6667
lib/ruby/stdlib/forwardable*
6768
lib/ruby/stdlib/gauntlet_rdoc.rb

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ matrix:
301301
name: deploy snapshots
302302
script:
303303
- cp .travis-maven-settings.xml $HOME/.m2/settings.xml
304-
- ./mvnw clean deploy -Prelease
304+
- ./mvnw -B clean deploy -Prelease
305305
if: env(SONATYPE_USERNAME) IS present AND type = push AND branch IN (master, jruby-9.2) # only master and maintenance pushes
306306

307307
allow_failures:

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
source 'https://rubygems.org'
22

3-
gem 'rspec', '3.9.0'
4-
gem 'rspec-expectations', '3.9.2' # pinned to work around jruby/jruby#6452
3+
gem 'rspec', '3.10.0'

core/pom.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
jar 'org.jruby:dirgra:0.3'
5757

5858
jar 'com.headius:invokebinder:1.11'
59-
jar 'com.headius:options:1.4'
59+
jar 'com.headius:options:1.5'
6060

6161
jar 'bsf:bsf:2.4.0', :scope => 'provided'
6262
jar 'com.jcraft:jzlib:1.1.3'
@@ -172,7 +172,7 @@
172172
plugin( :compiler,
173173
'encoding' => 'utf-8',
174174
'debug' => 'true',
175-
'verbose' => 'true',
175+
'verbose' => 'false',
176176
'fork' => 'true',
177177
'compilerArgs' => { 'arg' => '-J-Xmx1G' },
178178
'showWarnings' => 'true',

core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ DO NOT MODIFIY - GENERATED CODE
170170
<dependency>
171171
<groupId>com.headius</groupId>
172172
<artifactId>options</artifactId>
173-
<version>1.4</version>
173+
<version>1.5</version>
174174
</dependency>
175175
<dependency>
176176
<groupId>bsf</groupId>
@@ -506,7 +506,7 @@ DO NOT MODIFIY - GENERATED CODE
506506
<configuration>
507507
<encoding>utf-8</encoding>
508508
<debug>true</debug>
509-
<verbose>true</verbose>
509+
<verbose>false</verbose>
510510
<fork>true</fork>
511511
<compilerArgs>
512512
<arg>-J-Xmx1G</arg>

core/src/main/java/org/jruby/IncludedModuleWrapper.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,16 @@ protected IRubyObject getAutoloadConstant(String name, boolean forceLoad) {
197197
return origin.getAutoloadConstant(name, forceLoad);
198198
}
199199

200+
@Override
201+
protected Map<String, Autoload> getAutoloadMap() {
202+
return origin.getAutoloadMap();
203+
}
204+
205+
@Override
206+
protected Map<String, Autoload> getAutoloadMapForWrite() {
207+
return origin.getAutoloadMapForWrite();
208+
}
209+
200210
@Override
201211
protected DynamicMethod searchMethodCommon(String id) {
202212
// IncludedModuleWrapper needs to search prepended modules too, so search until we find methodLocation

core/src/main/java/org/jruby/Ruby.java

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
import org.jruby.ext.jruby.JRubyUtilLibrary;
5959
import org.jruby.ext.thread.ConditionVariable;
6060
import org.jruby.ext.thread.Mutex;
61+
import org.jruby.ext.thread.Queue;
6162
import org.jruby.ext.thread.SizedQueue;
6263
import org.jruby.ir.IRScope;
6364
import org.jruby.ir.IRScriptBody;
@@ -478,10 +479,13 @@ private Ruby(RubyInstanceConfig config) {
478479

479480
// Initialize exceptions
480481
initExceptions();
481-
Mutex.setup(this);
482-
ConditionVariable.setup(this);
483-
org.jruby.ext.thread.Queue.setup(this);
484-
SizedQueue.setup(this);
482+
483+
// Thread library utilities
484+
mutexClass = Mutex.setup(threadClass, objectClass);
485+
conditionVariableClass = ConditionVariable.setup(threadClass, objectClass);
486+
queueClass = Queue.setup(threadClass, objectClass);
487+
closedQueueError = Queue.setupError(queueClass, stopIteration, objectClass);
488+
sizedQueueClass = SizedQueue.setup(threadClass, queueClass, objectClass);
485489

486490
fiberClass = new ThreadFiberLibrary().createFiberClass(this);
487491

@@ -562,10 +566,10 @@ private void initBootLibraries() {
562566
}
563567

564568
// Provide some legacy libraries
565-
loadService.provide("enumerator", "enumerator.rb");
566-
loadService.provide("rational", "rational.rb");
567-
loadService.provide("complex", "complex.rb");
568-
loadService.provide("thread", "thread.rb");
569+
loadService.provide("enumerator.rb");
570+
loadService.provide("rational.rb");
571+
loadService.provide("complex.rb");
572+
loadService.provide("thread.rb");
569573

570574
// Load preludes
571575
initRubyPreludes();
@@ -1774,8 +1778,8 @@ private void initJavaSupport() {
17741778
new Java().load(this, false);
17751779
new JRubyUtilLibrary().load(this, false);
17761780

1777-
loadService.provide("java", "java.rb");
1778-
loadService.provide("jruby/util", "jruby/util.rb");
1781+
loadService.provide("java.rb");
1782+
loadService.provide("jruby/util.rb");
17791783
}
17801784
}
17811785

@@ -2226,6 +2230,26 @@ public void setLocation(RubyClass location) {
22262230
this.locationClass = location;
22272231
}
22282232

2233+
public RubyClass getMutex() {
2234+
return mutexClass;
2235+
}
2236+
2237+
public RubyClass getConditionVariable() {
2238+
return conditionVariableClass;
2239+
}
2240+
2241+
public RubyClass getQueue() {
2242+
return queueClass;
2243+
}
2244+
2245+
public RubyClass getClosedQueueError() {
2246+
return closedQueueError;
2247+
}
2248+
2249+
public RubyClass getSizedQueueClass() {
2250+
return sizedQueueClass;
2251+
}
2252+
22292253
public RubyModule getWarning() {
22302254
return warningModule;
22312255
}
@@ -3529,6 +3553,10 @@ public RubyString newString(String string) {
35293553
return RubyString.newString(this, string);
35303554
}
35313555

3556+
public RubyString newDeduplicatedString(String string) {
3557+
return freezeAndDedupString(RubyString.newString(this, string));
3558+
}
3559+
35323560
public RubyString newString(ByteList byteList) {
35333561
return RubyString.newString(this, byteList);
35343562
}
@@ -5315,6 +5343,11 @@ void setException(RubyClass exceptionClass) {
53155343
private final RubyClass dummyClass;
53165344
private final RubyClass randomClass;
53175345
private final RubyClass dataClass;
5346+
private final RubyClass mutexClass;
5347+
private final RubyClass conditionVariableClass;
5348+
private final RubyClass queueClass;
5349+
private final RubyClass closedQueueError;
5350+
private final RubyClass sizedQueueClass;
53185351

53195352
private RubyClass tmsStruct;
53205353
private RubyClass passwdStruct;

0 commit comments

Comments
 (0)