Sha256: 9705739aec75f62a24a2b6c50889e5a5954941a1192790d774ebeff16715132c
Contents?: true
Size: 390 Bytes
Versions: 6
Compression:
Stored size: 390 Bytes
Contents
describe "Kernel.loop" do it "calls block until it is terminated by a break" do i = 0 loop do i = i + 1 break if i == 10 end i.should == 10 end it "returns value passed to break" do loop do break 123 end.should == 123 end it "returns nil if no value passed to break" do loop do break end.should == nil end end
Version data entries
6 entries across 6 versions & 1 rubygems