pry-exception_explorer 0.1.3.1 → 0.1.3.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.
@@ -29,7 +29,7 @@ class Object
|
|
29
29
|
end
|
30
30
|
|
31
31
|
if !PryExceptionExplorer.enabled?
|
32
|
-
if exception.is_a?(Exception)
|
32
|
+
if exception.is_a?(Exception) || (exception.is_a?(Class) && exception < Exception)
|
33
33
|
return super(*args)
|
34
34
|
elsif exception.nil?
|
35
35
|
if $!
|
@@ -42,14 +42,30 @@ class Object
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
|
46
|
-
|
45
|
+
|
46
|
+
# puts exception
|
47
|
+
|
48
|
+
if exception.is_a?(Exception) || (exception.is_a?(Class) && exception < Exception)
|
49
|
+
if string
|
50
|
+
ex = exception.exception(string)
|
51
|
+
else
|
52
|
+
ex = exception.exception
|
53
|
+
end
|
54
|
+
elsif exception.nil?
|
55
|
+
if $!
|
56
|
+
ex = $!.exception
|
57
|
+
else
|
58
|
+
ex = RuntimeError.exception
|
59
|
+
end
|
47
60
|
else
|
48
|
-
ex =
|
61
|
+
ex = RuntimeError.exception
|
49
62
|
end
|
50
63
|
|
64
|
+
|
51
65
|
ex.set_backtrace(array ? array : caller)
|
52
66
|
|
67
|
+
# puts ex
|
68
|
+
|
53
69
|
# revert to normal exception behaviour if EE not enabled.
|
54
70
|
# if !PryExceptionExplorer.enabled?
|
55
71
|
# return super(*args)
|
@@ -22,9 +22,9 @@ module PryExceptionExplorer
|
|
22
22
|
|
23
23
|
class << self
|
24
24
|
|
25
|
-
# @return [Hash] A
|
25
|
+
# @return [Hash] A local hash.
|
26
26
|
def local_hash
|
27
|
-
|
27
|
+
@hash ||= {}
|
28
28
|
end
|
29
29
|
|
30
30
|
# @param [Boolean] v Whether Exception Explorer is enabled.
|
@@ -1,20 +1,20 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
|
-
s.name =
|
5
|
-
s.version = "0.1.3"
|
4
|
+
s.name = "pry-exception_explorer"
|
5
|
+
s.version = "0.1.3.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = [
|
9
|
-
s.date =
|
10
|
-
s.description =
|
11
|
-
s.email =
|
12
|
-
s.files = [
|
13
|
-
s.homepage =
|
14
|
-
s.require_paths = [
|
15
|
-
s.rubygems_version =
|
16
|
-
s.summary =
|
17
|
-
s.test_files = [
|
8
|
+
s.authors = ["John Mair (banisterfiend)"]
|
9
|
+
s.date = "2012-02-06"
|
10
|
+
s.description = "Enter the context of exceptions"
|
11
|
+
s.email = "jrmair@gmail.com"
|
12
|
+
s.files = [".gemtest", ".gitignore", ".travis.yml", ".yardopts", "CHANGELOG", "Gemfile", "LICENSE", "README.md", "Rakefile", "examples/example_c_inline.rb", "examples/example_inline.rb", "examples/example_wrap.rb", "lib/pry-exception_explorer.rb", "lib/pry-exception_explorer/cli.rb", "lib/pry-exception_explorer/commands.rb", "lib/pry-exception_explorer/core_ext.rb", "lib/pry-exception_explorer/intercept.rb", "lib/pry-exception_explorer/lazy_frame.rb", "lib/pry-exception_explorer/shim_builder.rb", "lib/pry-exception_explorer/version.rb", "pry-exception_explorer.gemspec", "test/helper.rb", "test/test_exceptions_in_pry.rb", "test/test_inline_exceptions.rb", "test/test_wrapped_exceptions.rb"]
|
13
|
+
s.homepage = "https://github.com/banister/pry-exception_explorer"
|
14
|
+
s.require_paths = ["lib"]
|
15
|
+
s.rubygems_version = "1.8.11"
|
16
|
+
s.summary = "Enter the context of exceptions"
|
17
|
+
s.test_files = ["test/helper.rb", "test/test_exceptions_in_pry.rb", "test/test_inline_exceptions.rb", "test/test_wrapped_exceptions.rb"]
|
18
18
|
|
19
19
|
if s.respond_to? :specification_version then
|
20
20
|
s.specification_version = 3
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: pry-exception_explorer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.3.
|
5
|
+
version: 0.1.3.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- John Mair (banisterfiend)
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-02-
|
13
|
+
date: 2012-02-06 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: pry-stack_explorer
|
@@ -111,3 +111,4 @@ test_files:
|
|
111
111
|
- test/test_exceptions_in_pry.rb
|
112
112
|
- test/test_inline_exceptions.rb
|
113
113
|
- test/test_wrapped_exceptions.rb
|
114
|
+
has_rdoc:
|