Skip to content

Commit

Permalink
Merge pull request #86 from prpetten/fix/deprecation-warning-debug-in…
Browse files Browse the repository at this point in the history
…spector

Fix - Deprecation Warning on DebugInspector
  • Loading branch information
prpetten authored Mar 6, 2024
2 parents c910071 + 3f01a6b commit cf65de3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- "2.6"
- "2.7"
- "3.0"
- "3.1"
- "3.2"
exclude:
# 2.2 segfaults on recent Ubuntu: https://github.com/ruby/setup-ruby/issues/496
- { ruby: "2.2" }
Expand Down
2 changes: 1 addition & 1 deletion binding_of_caller.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ TXT

spec.require_paths = ["lib"]

spec.add_dependency "debug_inspector", ">= 0.0.1"
spec.add_dependency "debug_inspector", ">= 1.2.0"
end
4 changes: 2 additions & 2 deletions lib/binding_of_caller/mri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def of_caller(n)
def callers
ary = []

RubyVM::DebugInspector.open do |dc|
DebugInspector.open do |dc|
locs = dc.backtrace_locations

locs.size.times do |i|
Expand All @@ -43,7 +43,7 @@ def frame_count
# @return [Symbol]
def frame_type
return nil if !@iseq

# apparently the 9th element of the iseq array holds the frame type
# ...not sure how reliable this is.
@frame_type ||= @iseq.to_a[9]
Expand Down

0 comments on commit cf65de3

Please sign in to comment.