summaryrefslogtreecommitdiff
path: root/chef/lib
diff options
context:
space:
mode:
authorDaniel DeLeo <dan@opscode.com>2011-04-15 15:31:06 -0700
committerDaniel DeLeo <dan@opscode.com>2011-04-15 15:31:06 -0700
commit832c88e93fbc7a4213eb683c1cd20f4ac359767e (patch)
treec769141ed1c3746790ccb5ee01e4202930df7605 /chef/lib
parent576a156bf9c753d2c9a65ac3401715b27a1b9b24 (diff)
downloadchef-832c88e93fbc7a4213eb683c1cd20f4ac359767e.tar.gz
Object#tap for ruby 1.8.6
Diffstat (limited to 'chef/lib')
-rw-r--r--chef/lib/chef/monkey_patches/object.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/chef/lib/chef/monkey_patches/object.rb b/chef/lib/chef/monkey_patches/object.rb
new file mode 100644
index 0000000000..017a4b7938
--- /dev/null
+++ b/chef/lib/chef/monkey_patches/object.rb
@@ -0,0 +1,9 @@
+class Object
+ unless new.respond_to?(:tap)
+ def tap
+ yield self
+ return self
+ end
+ end
+end
+