summaryrefslogtreecommitdiff
path: root/spec/ruby/core/objectspace/weakmap/shared/each.rb
blob: 3d43a19347971a93a54c1448a92e42f1639ed1b5 (plain)
1
2
3
4
5
6
7
8
9
10
describe :weakmap_each, shared: true do
  it "must take a block, except when empty" do
    map = ObjectSpace::WeakMap.new
    key = "a".upcase
    ref = "x"
    map.send(@method).should == map
    map[key] = ref
    -> { map.send(@method) }.should raise_error(LocalJumpError)
  end
end