Sha256: 24f8c554d185d2116964bbe68f1bf25b1f81277ba47c4a57cd19043c089a1516
Contents?: true
Size: 498 Bytes
Versions: 83
Compression:
Stored size: 498 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes' describe "Thread#keys" do it "returns an array of the names of the thread-local variables as symbols" do th = Thread.new do Thread.current["cat"] = 'woof' Thread.current[:cat] = 'meow' Thread.current[:dog] = 'woof' end th.join th.keys.sort_by {|x| x.to_s}.should == [:cat,:dog] end end
Version data entries
83 entries across 83 versions & 1 rubygems