From 9bde80ba2b63e0d85ba3a87c8ba6491409143bc4 Mon Sep 17 00:00:00 2001 From: John Mair Date: Wed, 21 Dec 2011 04:24:35 +1300 Subject: [PATCH] added Pry::Method#undefined? and Pry::Method::Disowned#undefined? --- lib/pry/method.rb | 12 ++++++++++++ lib/pry/version.rb | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/pry/method.rb b/lib/pry/method.rb index edbc5f7f..f139d6e1 100644 --- a/lib/pry/method.rb +++ b/lib/pry/method.rb @@ -177,6 +177,12 @@ class Pry @wrapped_owner ||= Pry::WrappedModule.new(owner) end + # Is the method undefined? (aka `Disowned`) + # @return [Boolean] false + def undefined? + false + end + # Get the name of the method including the class on which it was defined. # @example # method(:puts).method_name @@ -433,6 +439,12 @@ class Pry @receiver, @name = *args end + # Is the method undefined? (aka `Disowned`) + # @return [Boolean] true + def undefined? + true + end + # Get the hypothesized owner of the method. # # @return [Object] diff --git a/lib/pry/version.rb b/lib/pry/version.rb index 3bbd92f7..99140fae 100644 --- a/lib/pry/version.rb +++ b/lib/pry/version.rb @@ -1,3 +1,3 @@ class Pry - VERSION = "0.9.8.0pre1" + VERSION = "0.9.8pre2" end