Skip to content
Browse files

Ruby 1.9.2 compat: Array#* uses to_str instead of to_s to join values…

… since Ruby 1.9.2

[#2959 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent 5a0e295 commit 8dab61d146f26c18acdef1fcc57b01612f96440c @amatsuda amatsuda committed with jeremy Aug 6, 2009
View
3 activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -277,7 +277,6 @@ def to_sql
add_column_options!(column_sql, column_options) unless type.to_sym == :primary_key
column_sql
end
- alias to_s :to_sql
private
@@ -508,7 +507,7 @@ def references(*args)
# concatenated together. This string can then be prepended and appended to
# to generate the final SQL to create the table.
def to_sql
- @columns * ', '
+ @columns.map(&:to_sql) * ', '
end
private

0 comments on commit 8dab61d

Please sign in to comment.
Something went wrong with that request. Please try again.