# File lib/pry/command_set.rb, line 341 def []=(pattern, command) if command.equal?(nil) return @commands.delete(pattern) end unless Class === command && command < Pry::Command raise TypeError, "command is not a subclass of Pry::Command" end bind_command_to_pattern = pattern != command.match if bind_command_to_pattern command_copy = command.dup command_copy.match = pattern @commands[pattern] = command_copy else @commands[pattern] = command end end