Permalink
Browse files

Performance: minor Column#text? and #number? speedups

  • Loading branch information...
jeremy committed Jun 25, 2008
1 parent 339491a commit c39726057714970f8e39d27bd0cb49fa4d6bc383
@@ -30,11 +30,11 @@ def initialize(name, default, sql_type = nil, null = true)
end
def text?
- [:string, :text].include? type
+ type == :string || type == :text
end
def number?
- [:float, :integer, :decimal].include? type
+ type == :integer || type == :float || type == :decimal
end
# Returns the Ruby class that corresponds to the abstract data type.

0 comments on commit c397260

Please sign in to comment.