Skip to content

Use Ruby's built-in debugger. #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,3 @@ gem "activesupport"
gem "xml-simple"
gem "timecop"
gem "colorize"

if RUBY_VERSION =~ /1\.9\.\d+/
gem "debugger"
else
gem "ruby-debug"
end
1 change: 0 additions & 1 deletion letters.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Gem::Specification.new do |s|
s.add_dependency "activesupport"
s.add_dependency "xml-simple"
s.add_dependency "colorize"
s.add_dependency "debugger"

s.add_development_dependency "timecop"
s.add_development_dependency "rspec"
Expand Down
9 changes: 7 additions & 2 deletions lib/letters/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ def self.pretty_callstack(callstack)

# This provides a mockable method for testing
def self.call_debugger
require "ruby-debug"
debugger
if (defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx')
require 'rubinius/debugger'
Rubinius::Debugger.start
else
require 'debug'
end

nil
end

Expand Down