summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Irwin <conrad.irwin@gmail.com>2012-06-03 18:37:11 -0700
committerConrad Irwin <conrad.irwin@gmail.com>2012-06-03 18:38:07 -0700
commit22cfabf621248394874841b8791b720ca789e7ac (patch)
tree500688593dfe86ec19dee61c0f51803c9a7f0810
parent2a58843a05fd59949f9056fa24bbe0d666a35d48 (diff)
downloadmethod_source-22cfabf621248394874841b8791b720ca789e7ac.tar.gz
Fix procs/lambdas
-rw-r--r--lib/method_source.rb4
-rw-r--r--lib/method_source/version.rb2
-rw-r--r--method_source.gemspec2
3 files changed, 4 insertions, 4 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
diff --git a/lib/method_source/version.rb b/lib/method_source/version.rb
index 0785de5..36c82c0 100644
--- a/lib/method_source/version.rb
+++ b/lib/method_source/version.rb
@@ -1,3 +1,3 @@
module MethodSource
- VERSION = "0.8.pre.1"
+ VERSION = "0.8.pre.2"
end
diff --git a/method_source.gemspec b/method_source.gemspec
index c0af5f2..1e5c8f0 100644
--- a/method_source.gemspec
+++ b/method_source.gemspec
@@ -2,7 +2,7 @@
Gem::Specification.new do |s|
s.name = "method_source"
- s.version = "0.8.pre.1"
+ s.version = "0.8.pre.2"
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.authors = ["John Mair (banisterfiend)"]