summaryrefslogtreecommitdiff
path: root/lib/irb/command/backtrace.rb
diff options
Diffstat (limited to 'lib/irb/command/backtrace.rb')
-rw-r--r--lib/irb/command/backtrace.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/irb/command/backtrace.rb b/lib/irb/command/backtrace.rb
new file mode 100644
index 0000000000..47e5e60724
--- /dev/null
+++ b/lib/irb/command/backtrace.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+require_relative "debug"
+
+module IRB
+ # :stopdoc:
+
+ module Command
+ class Backtrace < DebugCommand
+ def self.transform_args(args)
+ args&.dump
+ end
+
+ def execute(*args)
+ super(pre_cmds: ["backtrace", *args].join(" "))
+ end
+ end
+ end
+
+ # :startdoc:
+end