diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 16:42:17 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 16:42:17 -0400 |
commit | ed8e0f9c02c291a51f93a2123e099d07756d75bb (patch) | |
tree | 7d46f462a3ea533bcec0287c3f582f40d60e5729 /lib/arel/engines/sql/extensions/nil_class.rb | |
parent | 0352d28a56de36946e691a0df390cfdfa7b1de7c (diff) | |
download | rails-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.rb | 12 |
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 |