summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharney Kaye2017-02-06 10:13:54 -0500
committerCharney Kaye2017-02-09 10:48:16 -0500
commit45771b01dae493024b1a9de93eab55d26281bfa6 (patch)
tree3c4b6cb75be10cbdc747c896b12c7c3ef6eec549
parent7ffa174c08c6e51576af327bab6a5f58d394a4a9 (diff)
downloadhcl-45771b01dae493024b1a9de93eab55d26281bfa6.tar.bz2
fix deprecated impls, closes #72
-rw-r--r--CHANGELOG.markdown1
-rw-r--r--lib/hcl/app.rb4
-rw-r--r--lib/hcl/timesheet_resource.rb2
3 files changed, 4 insertions, 3 deletions
diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown
index 6271cf4..7d0c6ad 100644
--- a/CHANGELOG.markdown
+++ b/CHANGELOG.markdown
@@ -3,6 +3,7 @@
## v0.4.16
* improved bash completion (from chet0xhenry)
+* fix deprecated `respond_to?` impls, closes #72 (charneykaye)
## v0.4.15 2015-06-12
diff --git a/lib/hcl/app.rb b/lib/hcl/app.rb
index 14f626d..4f2530b 100644
--- a/lib/hcl/app.rb
+++ b/lib/hcl/app.rb
@@ -48,9 +48,9 @@ module HCl
if command? @command
result = send @command, *@args
if not result.nil?
- if result.respond_to? :join
+ if result.respond_to? :join, include_all=false
puts result.join(', ')
- elsif result.respond_to? :to_s
+ elsif result.respond_to? :to_s, include_all=false
puts result
end
end
diff --git a/lib/hcl/timesheet_resource.rb b/lib/hcl/timesheet_resource.rb
index e230f1f..271ac2c 100644
--- a/lib/hcl/timesheet_resource.rb
+++ b/lib/hcl/timesheet_resource.rb
@@ -12,7 +12,7 @@ module HCl
@data.key?(method.to_sym) ? @data[method] : super
end
- def respond_to? method
+ def respond_to? method, include_all=false
(@data && @data.key?(method.to_sym)) || super
end