1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Minor style change (only using CamelCase for classes/modules)

This commit is contained in:
Ryan Fitzgerald 2012-12-27 14:25:46 -08:00
parent 5e9674f13a
commit 3dd6e58a95

View file

@ -4,7 +4,7 @@ class Pry
# friends). # friends).
# #
# @see Object#__binding__ # @see Object#__binding__
BindingImplMethod = [<<-METHOD, __FILE__, __LINE__ + 1] BINDING_METHOD_IMPL = [<<-METHOD, __FILE__, __LINE__ + 1]
# Get a binding with 'self' set to self, and no locals. # Get a binding with 'self' set to self, and no locals.
# #
# The default definee is determined by the context in which the # The default definee is determined by the context in which the
@ -84,14 +84,14 @@ class Object
# it has the nice property that we can memoize this check. # it has the nice property that we can memoize this check.
begin begin
# instance_eval sets the default definee to the object's singleton class # instance_eval sets the default definee to the object's singleton class
instance_eval(*Pry::BindingImplMethod) instance_eval *Pry::BINDING_METHOD_IMPL
# If we can't define methods on the Object's singleton_class. Then we fall # If we can't define methods on the Object's singleton_class. Then we fall
# back to setting the default definee to be the Object's class. That seems # back to setting the default definee to be the Object's class. That seems
# nicer than having a REPL in which you can't define methods. # nicer than having a REPL in which you can't define methods.
rescue TypeError rescue TypeError
# class_eval sets the default definee to self.class # class_eval sets the default definee to self.class
self.class.class_eval(*Pry::BindingImplMethod) self.class.class_eval *Pry::BINDING_METHOD_IMPL
end end
end end