lib/byebug/commands/method.rb in byebug-0.0.1 vs lib/byebug/commands/method.rb in byebug-1.0.0

- old
+ new

@@ -5,11 +5,11 @@ have_methodsig = true rescue LoadError have_methodsig = false end - # Implements the byebug 'method sig' command. + # Implements byebug's 'method sig' command. class MethodSigCommand < Command def regexp /^\s*m(?:ethod)?\s+sig(?:nature)?\s+(\S+)\s*$/ end @@ -37,11 +37,11 @@ } end end end if have_methodsig - # Implements the byebug 'method' command. + # Implements byebug's 'method' command. class MethodCommand < Command def regexp /^\s*m(?:ethod)?\s+((iv)|(i(:?nstance)?)\s+)?/ end @@ -51,17 +51,17 @@ obj.instance_variables.sort.each do |v| print "%s = %s\n", v, obj.instance_variable_get(v).inspect end elsif @match[1] obj = debug_eval(@match.post_match) - print "%s\n", columnize(obj.methods.sort(), + print "%s\n", columnize(obj.methods.sort(), self.class.settings[:width]) else obj = debug_eval(@match.post_match) unless obj.kind_of? Module print "Should be Class/Module: %s\n", @match.post_match else - print "%s\n", columnize(obj.instance_methods(false).sort(), + print "%s\n", columnize(obj.instance_methods(false).sort(), self.class.settings[:width]) end end end