diff options
author | Daniel DeLeo <dan@opscode.com> | 2011-04-15 15:31:06 -0700 |
---|---|---|
committer | Daniel DeLeo <dan@opscode.com> | 2011-04-15 15:31:06 -0700 |
commit | 832c88e93fbc7a4213eb683c1cd20f4ac359767e (patch) | |
tree | c769141ed1c3746790ccb5ee01e4202930df7605 /chef/lib | |
parent | 576a156bf9c753d2c9a65ac3401715b27a1b9b24 (diff) | |
download | chef-832c88e93fbc7a4213eb683c1cd20f4ac359767e.tar.gz |
Object#tap for ruby 1.8.6
Diffstat (limited to 'chef/lib')
-rw-r--r-- | chef/lib/chef/monkey_patches/object.rb | 9 |
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 + |