From 702ad710b57bef45b081ebf42e6fa70820fdd810 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 1 Aug 2014 10:07:38 -0700 Subject: Added Object#self which returns the object itself --- activesupport/test/core_ext/object/self_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 activesupport/test/core_ext/object/self_test.rb (limited to 'activesupport/test') diff --git a/activesupport/test/core_ext/object/self_test.rb b/activesupport/test/core_ext/object/self_test.rb new file mode 100644 index 0000000000..751199e41c --- /dev/null +++ b/activesupport/test/core_ext/object/self_test.rb @@ -0,0 +1,9 @@ +require 'abstract_unit' +require 'active_support/core_ext/object' + +class Object::SelfTest < ActiveSupport::TestCase + test 'self returns self' do + object = 'fun' + assert_equal object, object.self + end +end -- cgit v1.2.3