Sha256: d70f34f083a77ffaaaa7e2c1917d09c4a6b1bd41e0278a3143a97a4c8245ce7e
Contents?: true
Size: 442 Bytes
Versions: 52
Compression:
Stored size: 442 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../fixtures/classes', __FILE__) 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
52 entries across 52 versions & 2 rubygems