exception_details 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +6 -6
- data/lib/exception_details/inspect_variables.rb +1 -1
- data/lib/exception_details/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -36,9 +36,9 @@ Features/benefits:
|
|
36
36
|
Exception:
|
37
37
|
can't convert nil into String
|
38
38
|
Variables:
|
39
|
-
<String>greeting = "hello"
|
40
|
-
<TypeError>e = #<TypeError: can't convert nil into String>
|
41
|
-
<NilClass
|
39
|
+
<String> greeting = "hello"
|
40
|
+
<TypeError> e = #<TypeError: can't convert nil into String>
|
41
|
+
<NilClass> @name = nil
|
42
42
|
Backtrace:
|
43
43
|
/Users/someguy/apps/exception_details/spec/exception_details_spec.rb:20:in `+'
|
44
44
|
/Users/someguy/apps/exception_details/spec/exception_details_spec.rb:20:in `block (3 levels) in <top (required)>'
|
@@ -48,9 +48,9 @@ Features/benefits:
|
|
48
48
|
|
49
49
|
e.inspect_variables ->
|
50
50
|
|
51
|
-
<String>greeting = "hello"
|
52
|
-
<TypeError>e = #<TypeError: can't convert nil into String>
|
53
|
-
<NilClass
|
51
|
+
<String> greeting = "hello"
|
52
|
+
<TypeError> e = #<TypeError: can't convert nil into String>
|
53
|
+
<NilClass> @name = nil
|
54
54
|
|
55
55
|
Or access the variables in the binding yourself...
|
56
56
|
|
@@ -19,7 +19,7 @@ module ExceptionDetails
|
|
19
19
|
variable_names = target_binding.eval(variable_scope.to_s)
|
20
20
|
variable_names.each do |vname|
|
21
21
|
value = target_binding.eval(vname.to_s)
|
22
|
-
variable_value_string = "\t<#{value.class}
|
22
|
+
variable_value_string = "\t<#{value.class}> #{vname} = #{value.inspect}"
|
23
23
|
variable_strings << variable_value_string
|
24
24
|
end
|
25
25
|
end
|