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: 6a837542ca92
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 661b414ca9c4
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Mar 17, 2015

  1. Copy the full SHA
    1254dfa View commit details
  2. [Truffle] - Move code from rubinius/common/thread.rb to rubinius/api/…

    …kernel/common/thread.rb
    lucasallan committed Mar 17, 2015
    8
    Copy the full SHA
    661b414 View commit details
1 change: 0 additions & 1 deletion spec/truffle/tags/core/random/new_seed_tags.txt

This file was deleted.

1 change: 0 additions & 1 deletion truffle/src/main/ruby/core.rb
Original file line number Diff line number Diff line change
@@ -74,7 +74,6 @@
require_relative 'core/rubinius/common/time'
require_relative 'core/rubinius/common/true'
require_relative 'core/rubinius/common/random'
require_relative 'core/rubinius/common/thread'

require_relative 'core/rubinius/common/rational'
require_relative 'core/rubinius/common/rationalizer'
Original file line number Diff line number Diff line change
@@ -41,6 +41,10 @@ class Thread
# recurse back to :foo, it could require making
# the tables independant.

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

def self.recursion_guard(obj)
id = obj.object_id
objects = current.recursive_objects
9 changes: 9 additions & 0 deletions truffle/src/main/ruby/core/rubinius/common/kernel.rb
Original file line number Diff line number Diff line change
@@ -134,4 +134,13 @@ def warn(*messages)
end
module_function :warn

def srand(seed=undefined)
if undefined.equal? seed
seed = Thread.current.randomizer.generate_seed
end
seed = Rubinius::Type.coerce_to seed, Integer, :to_int
Thread.current.randomizer.swap_seed seed
end
module_function :srand

end
37 changes: 0 additions & 37 deletions truffle/src/main/ruby/core/rubinius/common/thread.rb

This file was deleted.