lib/irbtools/commands/code.rb in irbtools-4.0.2 vs lib/irbtools/commands/code.rb in irbtools-4.0.3
- old
+ new
@@ -6,10 +6,10 @@
category "Introspection"
description "Shows the syntax-highlighted source code of a method"
class << self
def transform_args(args)
- if args.strip =~ /\A(?:([\w:]+)([#.]))?(\w+)\z/
+ if args.strip =~ /\A(?:([\w:]+)([#.]))?(\w+[?!]?)\z/
if $1
if $2 == "#"
"#{$1}, #{$1}.instance_method(:#{$3})"
else
"#{$1}, :#{$3}"