summaryrefslogtreecommitdiffstats
path: root/test/rubygems/rubygems_plugin.rb
blob: 269c3f10db589cc913f0cb5e9b7a4c8fb34bf576 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'rubygems/command_manager'

class Gem::Commands::InterruptCommand < Gem::Command

  def initialize
    super('interrupt', 'Raises an Interrupt Exception', {})
  end

  def execute
    raise Interrupt, "Interrupt exception"
  end

end

Gem::CommandManager.instance.register_command :interrupt