lib/core/facets/binding/caller.rb in facets-2.7.0 vs lib/core/facets/binding/caller.rb in facets-2.8.0
- old
+ new
@@ -27,23 +27,21 @@
#
# def tester; p called; end
# tester #=> :tester
#
def __callee__
- name = /\`([^\']+)\'/.match(caller(1).first)[1]
- return name.to_sym
+ eval('__callee__')
end
# There is a lot of debate on what to call this.
# +method_name+ differs from #called only by the fact
# that it returns a string, rather then a symbol.
#
# def tester; p methodname; end
# tester #=> "tester"
#
def __method__
- name = /\`([^\']+)\'/.match(caller(1).first)[1]
- return name
+ eval('__method__')
end
end