Skip to content

Commit

Permalink
Fix some white space
Browse files Browse the repository at this point in the history
  • Loading branch information
mblumtritt committed May 12, 2024
1 parent 0773e26 commit e645544
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand All @@ -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:
Expand Down
50 changes: 25 additions & 25 deletions examples/foo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:0x0000000100ab1188 @value=:foo!>
# < Foo.create(:foo!)
# = #<Foo:0x0000000100ab1188 @value=: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:0x0000000100ab1188 @value=:foo!>
# < Foo.create(:foo!)
# = #<Foo:0x0000000100ab1188 @value=: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"

0 comments on commit e645544

Please sign in to comment.