aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/engines/sql/extensions/nil_class.rb
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2009-05-17 16:42:17 -0400
committerBryan Helmkamp <bryan@brynary.com>2009-05-17 16:42:17 -0400
commited8e0f9c02c291a51f93a2123e099d07756d75bb (patch)
tree7d46f462a3ea533bcec0287c3f582f40d60e5729 /lib/arel/engines/sql/extensions/nil_class.rb
parent0352d28a56de36946e691a0df390cfdfa7b1de7c (diff)
downloadrails-ed8e0f9c02c291a51f93a2123e099d07756d75bb.tar.gz
rails-ed8e0f9c02c291a51f93a2123e099d07756d75bb.tar.bz2
rails-ed8e0f9c02c291a51f93a2123e099d07756d75bb.zip
Include modules to extend core classes to improve inspectability
Diffstat (limited to 'lib/arel/engines/sql/extensions/nil_class.rb')
-rw-r--r--lib/arel/engines/sql/extensions/nil_class.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/arel/engines/sql/extensions/nil_class.rb b/lib/arel/engines/sql/extensions/nil_class.rb
index 6f38ecdf3a..8c335f904a 100644
--- a/lib/arel/engines/sql/extensions/nil_class.rb
+++ b/lib/arel/engines/sql/extensions/nil_class.rb
@@ -1,5 +1,11 @@
-class NilClass
- def equality_predicate_sql
- 'IS'
+module Arel
+ module Sql
+ module NilClassExtensions
+ def equality_predicate_sql
+ 'IS'
+ end
+
+ NilClass.send(:include, self)
+ end
end
end