method_source 0.8.pre.1 → 0.8.pre.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/method_source.rb +2 -2
- data/lib/method_source/version.rb +1 -1
- data/method_source.gemspec +1 -1
- metadata +1 -1
data/lib/method_source.rb
CHANGED
@@ -107,7 +107,7 @@ module MethodSource
|
|
107
107
|
# self
|
108
108
|
# end
|
109
109
|
def source
|
110
|
-
MethodSource.source_helper(source_location, name)
|
110
|
+
MethodSource.source_helper(source_location, defined?(name) ? name : inspect)
|
111
111
|
end
|
112
112
|
|
113
113
|
# Return the comments associated with the method as a string.
|
@@ -119,7 +119,7 @@ module MethodSource
|
|
119
119
|
# =>
|
120
120
|
# # Removes all elements and returns self.
|
121
121
|
def comment
|
122
|
-
MethodSource.comment_helper(source_location, name)
|
122
|
+
MethodSource.comment_helper(source_location, defined?(name) ? name : inspect)
|
123
123
|
end
|
124
124
|
end
|
125
125
|
end
|
data/method_source.gemspec
CHANGED