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: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bf11021fc5a4
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 01a0ea175161
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 13, 2016

  1. Fixed Symbol.all_symbols spec.

    brixen committed Mar 13, 2016
    Copy the full SHA
    d03e8b4 View commit details
  2. Copy the full SHA
    01a0ea1 View commit details
Showing with 9 additions and 8 deletions.
  1. +3 −1 machine/builtin/thread.cpp
  2. +6 −7 spec/ruby/core/symbol/all_symbols_spec.rb
4 changes: 3 additions & 1 deletion machine/builtin/thread.cpp
Original file line number Diff line number Diff line change
@@ -474,7 +474,9 @@ namespace rubinius {
Thread* Thread::wakeup(STATE) {
utilities::thread::SpinLock::LockGuard guard(init_lock_);

if(!vm_) return nil<Thread>();
if(!CBOOL(alive()) || !vm_) {
return force_as<Thread>(Primitives::failure());
}

vm_->wakeup(state);

13 changes: 6 additions & 7 deletions spec/ruby/core/symbol/all_symbols_spec.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
require File.expand_path('../../../spec_helper', __FILE__)

describe "Symbol.all_symbols" do
it "returns an array containing all the Symbols in the symbol table" do
Symbol.all_symbols.is_a?(Array).should == true
Symbol.all_symbols.all? { |s| s.is_a?(Symbol) ? true : (p s; false) }.should == true
it "returns an Array" do
Symbol.all_symbols.should be_an_instance_of(Array)
end

it "increases size of the return array when new symbol comes" do
num_symbols = Symbol.all_symbols.size
eval ":aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
Symbol.all_symbols.size.should > num_symbols + 1
it "returns an Array containing Symbols that have been created" do
symbol = "symbol_specs_#{rand(5_000_000)}"
eval ":#{symbol}"
Symbol.all_symbols.should include(symbol.to_sym)
end
end