JoshCheek / seeing_is_believing

Displays the results of every line of code in your file
1.3k stars 54 forks source link

SiB messes up flip flop #88

Closed JoshCheek closed 7 years ago

JoshCheek commented 7 years ago

Without SiB

$ ruby -ve '
   if true..true
     p 1
   end
   if false..true
     p 2
   end
   '
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
1

With SiB

if true..true   # => true..true
  p 1           # => 1
end             # => 1
if false..true  # ~> ArgumentError: bad value for range
  p 2
end

# >> 1

# ~> ArgumentError
# ~> bad value for range
# ~>
# ~> program.rb:4:in `<main>'