method_source 0.8.pre.1 → 0.8.pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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