diff options
author | Conrad Irwin <conrad.irwin@gmail.com> | 2012-06-03 18:37:11 -0700 |
---|---|---|
committer | Conrad Irwin <conrad.irwin@gmail.com> | 2012-06-03 18:38:07 -0700 |
commit | 22cfabf621248394874841b8791b720ca789e7ac (patch) | |
tree | 500688593dfe86ec19dee61c0f51803c9a7f0810 /lib/method_source.rb | |
parent | 2a58843a05fd59949f9056fa24bbe0d666a35d48 (diff) | |
download | method_source-22cfabf621248394874841b8791b720ca789e7ac.tar.gz |
Fix procs/lambdas
Diffstat (limited to 'lib/method_source.rb')
-rw-r--r-- | lib/method_source.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/method_source.rb b/lib/method_source.rb index 6991dfe..7d16c3b 100644 --- a/lib/method_source.rb +++ b/lib/method_source.rb @@ -107,7 +107,7 @@ module MethodSource # self # end def source - MethodSource.source_helper(source_location, name) + MethodSource.source_helper(source_location, defined?(name) ? name : inspect) end # Return the comments associated with the method as a string. @@ -119,7 +119,7 @@ module MethodSource # => # # Removes all elements and returns self. def comment - MethodSource.comment_helper(source_location, name) + MethodSource.comment_helper(source_location, defined?(name) ? name : inspect) end end end |