From e645544b87267cce47af100d0be48ef7f6709f80 Mon Sep 17 00:00:00 2001 From: Mike Blumtritt Date: Sun, 12 May 2024 17:21:03 +0200 Subject: [PATCH] Fix some white space --- README.md | 28 +++++++++++++-------------- examples/foo.rb | 50 ++++++++++++++++++++++++------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 7721ba4..796e754 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,14 @@ File.open('test.txt', 'w') do |file| end end # output will look like -# > IO#<<(?) -# /projects/test.rb:1 -# > IO#write(*) -# /projects/test.rb:1 -# > IO#puts(*) -# /projects/test.rb:2 -# > IO#write(*) -# /projects/test.rb:2 +# > IO#<<(?) +# /projects/test.rb:1 +# > IO#write(*) +# /projects/test.rb:1 +# > IO#puts(*) +# /projects/test.rb:2 +# > IO#write(*) +# /projects/test.rb:2 ``` When you need to know if exceptions are raised and handled you can use `ImLost.trace_exceptions`: @@ -39,12 +39,12 @@ rescue SystemCallError raise('something went wrong!') end # output will look like -# x Errno::EEXIST: File exists @ rb_sysopen - / -# /projects/test.rb:2 -# ! Errno::EEXIST: File exists @ rb_sysopen - / -# /projects/test.rb:3 -# x RuntimeError: something went wrong! -# /projects/test.rb:4 +# x Errno::EEXIST: File exists @ rb_sysopen - / +# /projects/test.rb:2 +# ! Errno::EEXIST: File exists @ rb_sysopen - / +# /projects/test.rb:3 +# x RuntimeError: something went wrong! +# /projects/test.rb:4 ``` When you like to know if and when a code point is reached, `ImLost.here` will help: diff --git a/examples/foo.rb b/examples/foo.rb index 4c8e085..19e4004 100644 --- a/examples/foo.rb +++ b/examples/foo.rb @@ -35,28 +35,28 @@ def bar = :bar ImLost.vars(my_foo) # output will look like -# > Foo.create(:foo!) -# /projects/foo.rb25 -# > Foo.new(*) -# /projects/foo.rb6 -# < Foo.new(*) -# = # -# < Foo.create(:foo!) -# = # -# > Foo#foo(1, *[], :none, **{}, &nil) -# /projects/foo.rb28 -# > Foo#bar() -# /projects/foo.rb15 -# < Foo#bar() -# = :bar -# < Foo#foo(1, *[], :none, **{}, &nil) -# = "1-none-[]-{}-bar" -# = /projects/foo.rb29 -# instance variables: -# @value: "1-none-[]-{}-bar" -# = /projects/foo.rb32 -# instance variables: -# @value: "2-some-[a,b,c]-{:name=>:value}-bar" -# = /projects/foo.rb35 -# instance variables: -# @value: "3--[]-{}-bar" +# > Foo.create(:foo!) +# /projects/foo.rb25 +# > Foo.new(*) +# /projects/foo.rb6 +# < Foo.new(*) +# = # +# < Foo.create(:foo!) +# = # +# > Foo#foo(1, *[], :none, **{}, &nil) +# /projects/foo.rb28 +# > Foo#bar() +# /projects/foo.rb15 +# < Foo#bar() +# = :bar +# < Foo#foo(1, *[], :none, **{}, &nil) +# = "1-none-[]-{}-bar" +# = /projects/foo.rb29 +# instance variables: +# @value: "1-none-[]-{}-bar" +# = /projects/foo.rb32 +# instance variables: +# @value: "2-some-[a,b,c]-{:name=>:value}-bar" +# = /projects/foo.rb35 +# instance variables: +# @value: "3--[]-{}-bar"