binding_of_caller 0.7.3 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OGRkMDA4ZmZmOTk3NjY5MTk4OTRlNDhiMTIxNTQxZGI4Y2ZhZWYyNQ==
5
- data.tar.gz: !binary |-
6
- ZTk3YjU1ZjJjY2EwYzMzNWM1OTcyODIyNzQ2NzdmZGYzNTlkYjBiNQ==
2
+ SHA1:
3
+ metadata.gz: 3ca118584b33771699ce8297cafc573b9f1d2d80
4
+ data.tar.gz: cdfcd664fd08599e4f4826862fb49f8d4eecc992
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- M2NhODk4NDJlZDBiNzM1NDFkMzYxNmJmYjQxMjc1Y2I2NTc3YzRmNDVjODE1
10
- NTU5Zjc0MDM5MDFmNDA0ODc5NDI5ZDdjMTQzODY4OTU4NWVjY2Q1Yzk4Nzcy
11
- NTM4MDM0ZTRiZTg5NGYzYWU0MWIyMTk4YzA4Y2M4OTBjYThiZmU=
12
- data.tar.gz: !binary |-
13
- YzE5MmVhY2U1ZDY5YzdlYjJjZmMwNjY3MzFkMjFmYWE0OTVjYjU1M2IyOWYx
14
- NmQ1ZjIzNzkyMjJhYTQ5YmI3ZGY0NGY2NzZhNjRiZjZlOTI4MjY0ODA1YWIw
15
- ZTRiMGUzMTM4MDM1NDhhZTA3ZThlNWE5YjFmNmZkMDRhOTJkYjM=
6
+ metadata.gz: 21766025ccac08d6f79ba1e5bbef018116b765ca44b98f4fb269e494cf52dfb1066c4deb305eb30ddcdac2edc9e4f041926fe0e77767eb40a7cbd3ac866c00a7
7
+ data.tar.gz: 3b23f40eca0b622e89af12c443c54eed869441da9e3f2042b7d57acc77ffee2cd971ac8ee7e3beb9efcd58ce5b33003948f3705f711d928af1eeef3ee370fe3f
@@ -6,6 +6,7 @@ rvm:
6
6
  - 2.2.6
7
7
  - 2.3.0
8
8
  - 2.4.0
9
+ - 2.5.0
9
10
 
10
11
  notifications:
11
12
  irc: "irc.freenode.org#pry"
@@ -26,8 +27,8 @@ matrix:
26
27
 
27
28
  #script: rake test --trace
28
29
  #
29
- #before_install:
30
- # - gem update --system
30
+ before_install:
31
+ - gem update --system
31
32
  # - gem --version
32
33
  # - gem install rake bacon
33
34
  # - rake gem
@@ -1,21 +1,21 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: binding_of_caller 0.7.3 ruby lib
2
+ # stub: binding_of_caller 0.8.0 ruby lib
3
3
  # stub: ext/binding_of_caller/extconf.rb
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "binding_of_caller".freeze
7
- s.version = "0.7.3"
7
+ s.version = "0.8.0"
8
8
 
9
9
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
10
10
  s.require_paths = ["lib".freeze]
11
11
  s.authors = ["John Mair (banisterfiend)".freeze]
12
- s.date = "2017-10-22"
12
+ s.date = "2018-01-10"
13
13
  s.description = "Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack.".freeze
14
14
  s.email = "jrmair@gmail.com".freeze
15
15
  s.extensions = ["ext/binding_of_caller/extconf.rb".freeze]
16
16
  s.files = [".gemtest".freeze, ".gitignore".freeze, ".travis.yml".freeze, ".yardopts".freeze, "Gemfile".freeze, "HISTORY".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "binding_of_caller.gemspec".freeze, "examples/benchmark.rb".freeze, "examples/example.rb".freeze, "ext/binding_of_caller/binding_of_caller.c".freeze, "ext/binding_of_caller/extconf.rb".freeze, "ext/binding_of_caller/ruby_headers/192/debug.h".freeze, "ext/binding_of_caller/ruby_headers/192/dln.h".freeze, "ext/binding_of_caller/ruby_headers/192/eval_intern.h".freeze, "ext/binding_of_caller/ruby_headers/192/id.h".freeze, "ext/binding_of_caller/ruby_headers/192/iseq.h".freeze, "ext/binding_of_caller/ruby_headers/192/method.h".freeze, "ext/binding_of_caller/ruby_headers/192/node.h".freeze, "ext/binding_of_caller/ruby_headers/192/regenc.h".freeze, "ext/binding_of_caller/ruby_headers/192/regint.h".freeze, "ext/binding_of_caller/ruby_headers/192/regparse.h".freeze, "ext/binding_of_caller/ruby_headers/192/rubys_gc.h".freeze, "ext/binding_of_caller/ruby_headers/192/thread_pthread.h".freeze, "ext/binding_of_caller/ruby_headers/192/thread_win32.h".freeze, "ext/binding_of_caller/ruby_headers/192/timev.h".freeze, "ext/binding_of_caller/ruby_headers/192/transcode_data.h".freeze, "ext/binding_of_caller/ruby_headers/192/version.h".freeze, "ext/binding_of_caller/ruby_headers/192/vm_core.h".freeze, "ext/binding_of_caller/ruby_headers/192/vm_exec.h".freeze, "ext/binding_of_caller/ruby_headers/192/vm_insnhelper.h".freeze, "ext/binding_of_caller/ruby_headers/192/vm_opts.h".freeze, "ext/binding_of_caller/ruby_headers/193/addr2line.h".freeze, "ext/binding_of_caller/ruby_headers/193/atomic.h".freeze, "ext/binding_of_caller/ruby_headers/193/constant.h".freeze, "ext/binding_of_caller/ruby_headers/193/debug.h".freeze, "ext/binding_of_caller/ruby_headers/193/dln.h".freeze, "ext/binding_of_caller/ruby_headers/193/encdb.h".freeze, "ext/binding_of_caller/ruby_headers/193/eval_intern.h".freeze, "ext/binding_of_caller/ruby_headers/193/id.h".freeze, "ext/binding_of_caller/ruby_headers/193/internal.h".freeze, "ext/binding_of_caller/ruby_headers/193/iseq.h".freeze, "ext/binding_of_caller/ruby_headers/193/method.h".freeze, "ext/binding_of_caller/ruby_headers/193/node.h".freeze, "ext/binding_of_caller/ruby_headers/193/parse.h".freeze, "ext/binding_of_caller/ruby_headers/193/regenc.h".freeze, "ext/binding_of_caller/ruby_headers/193/regint.h".freeze, "ext/binding_of_caller/ruby_headers/193/regparse.h".freeze, "ext/binding_of_caller/ruby_headers/193/revision.h".freeze, "ext/binding_of_caller/ruby_headers/193/rubys_gc.h".freeze, "ext/binding_of_caller/ruby_headers/193/thread_pthread.h".freeze, "ext/binding_of_caller/ruby_headers/193/thread_win32.h".freeze, "ext/binding_of_caller/ruby_headers/193/timev.h".freeze, "ext/binding_of_caller/ruby_headers/193/transcode_data.h".freeze, "ext/binding_of_caller/ruby_headers/193/transdb.h".freeze, "ext/binding_of_caller/ruby_headers/193/version.h".freeze, "ext/binding_of_caller/ruby_headers/193/vm_core.h".freeze, "ext/binding_of_caller/ruby_headers/193/vm_exec.h".freeze, "ext/binding_of_caller/ruby_headers/193/vm_insnhelper.h".freeze, "ext/binding_of_caller/ruby_headers/193/vm_opts.h".freeze, "lib/binding_of_caller.rb".freeze, "lib/binding_of_caller/jruby_interpreted.rb".freeze, "lib/binding_of_caller/mri2.rb".freeze, "lib/binding_of_caller/rubinius.rb".freeze, "lib/binding_of_caller/version.rb".freeze, "test/test_binding_of_caller.rb".freeze]
17
17
  s.homepage = "http://github.com/banister/binding_of_caller".freeze
18
- s.rubygems_version = "2.6.13".freeze
18
+ s.rubygems_version = "2.6.14".freeze
19
19
  s.summary = "Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack.".freeze
20
20
  s.test_files = ["test/test_binding_of_caller.rb".freeze]
21
21
 
@@ -17,25 +17,19 @@ module BindingOfCaller
17
17
  # @return [Array<Binding>]
18
18
  def callers
19
19
  ary = []
20
-
21
- RubyVM::DebugInspector.open do |i|
22
- n = 0
23
- loop do
24
- begin
25
- b = i.frame_binding(n)
26
- rescue ArgumentError
27
- break
28
- end
29
20
 
21
+ RubyVM::DebugInspector.open do |dc|
22
+ locs = dc.backtrace_locations
23
+
24
+ locs.size.times do |i|
25
+ b = dc.frame_binding(i)
30
26
  if b
31
- b.instance_variable_set(:@iseq, i.frame_iseq(n))
27
+ b.instance_variable_set(:@iseq, dc.frame_iseq(i))
32
28
  ary << b
33
29
  end
34
-
35
- n += 1
36
30
  end
37
31
  end
38
-
32
+
39
33
  ary.drop(1)
40
34
  end
41
35
 
@@ -1,3 +1,3 @@
1
1
  module BindingOfCaller
2
- VERSION = "0.7.3"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: binding_of_caller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mair (banisterfiend)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-22 00:00:00.000000000 Z
11
+ date: 2018-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debug_inspector
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bacon
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: Retrieve the binding of a method's caller. Can also retrieve bindings
@@ -60,10 +60,10 @@ extensions:
60
60
  - ext/binding_of_caller/extconf.rb
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - .gemtest
64
- - .gitignore
65
- - .travis.yml
66
- - .yardopts
63
+ - ".gemtest"
64
+ - ".gitignore"
65
+ - ".travis.yml"
66
+ - ".yardopts"
67
67
  - Gemfile
68
68
  - HISTORY
69
69
  - LICENSE
@@ -137,17 +137,17 @@ require_paths:
137
137
  - lib
138
138
  required_ruby_version: !ruby/object:Gem::Requirement
139
139
  requirements:
140
- - - ! '>='
140
+ - - ">="
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - ! '>='
145
+ - - ">="
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  requirements: []
149
149
  rubyforge_project:
150
- rubygems_version: 2.6.13
150
+ rubygems_version: 2.6.14
151
151
  signing_key:
152
152
  specification_version: 4
153
153
  summary: Retrieve the binding of a method's caller. Can also retrieve bindings even