Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6a3cd6f3e631
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 79e9b2db1a9c
Choose a head ref
  • 3 commits
  • 8 files changed
  • 1 contributor

Commits on Mar 30, 2015

  1. [Truffle] Fix Dir#mkdir.

    eregon committed Mar 30, 2015
    Copy the full SHA
    9df3f53 View commit details
  2. Copy the full SHA
    16e8c01 View commit details
  3. [Truffle] Run library/thread specs.

    * Thread.exclusive, Queue and SizedQueue.
    eregon committed Mar 30, 2015
    Copy the full SHA
    79e9b2d View commit details
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Thread::SizedQueue#<< raises a ThreadError if queued elements exceed size when not blocking
1 change: 1 addition & 0 deletions spec/truffle/tags/library/thread/sizedqueue/enq_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Thread::SizedQueue#enq raises a ThreadError if queued elements exceed size when not blocking
1 change: 1 addition & 0 deletions spec/truffle/tags/library/thread/sizedqueue/max_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Thread::SizedQueue#max= raises a TypeError when given a non-numeric value
1 change: 1 addition & 0 deletions spec/truffle/tags/library/thread/sizedqueue/new_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Thread::SizedQueue#new raises a TypeError when the given argument is not Numeric
1 change: 1 addition & 0 deletions spec/truffle/tags/library/thread/sizedqueue/push_tags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fails:Thread::SizedQueue#push raises a ThreadError if queued elements exceed size when not blocking
3 changes: 2 additions & 1 deletion spec/truffle/truffle.mspec
Original file line number Diff line number Diff line change
@@ -103,7 +103,8 @@ class MSpecScript
"spec/ruby/library/erb",
"spec/ruby/library/set",
"spec/ruby/library/strscan",
"spec/ruby/library/stringio"
"spec/ruby/library/stringio",
"spec/ruby/library/thread"
]

set :tags_patterns, [
Original file line number Diff line number Diff line change
@@ -206,10 +206,11 @@ public MkdirNode(MkdirNode prev) {
@Specialization
public int mkdir(RubyString path) {
notDesignedForCompilation();
String dir = path.toString();

if (!new File(path.toString()).mkdir()) {
// TODO(CS, 12-Jan-15) handle failure
throw new UnsupportedOperationException();
if (!new File(dir).mkdir()) {
CompilerDirectives.transferToInterpreterAndInvalidate();
throw new RaiseException(getContext().getCoreLibrary().fileNotFoundError(dir, this));
}

return 0;
5 changes: 5 additions & 0 deletions truffle/src/main/ruby/core/rubinius/common/thread.rb
Original file line number Diff line number Diff line change
@@ -33,6 +33,11 @@
#++

class Thread
MUTEX_FOR_THREAD_EXCLUSIVE = Mutex.new

def self.exclusive
MUTEX_FOR_THREAD_EXCLUSIVE.synchronize { yield }
end

def randomizer
@randomizer ||= Rubinius::Randomizer.new