mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
String#to_a is not available in 1.9
This commit is contained in:
@@ -503,7 +503,7 @@ module ActiveRecord
|
||||
|
||||
def remove_origin_comment(migration_source)
|
||||
if migration_source =~ /^# This migration comes from/
|
||||
migration_source = migration_source.to_a[1..-1].join
|
||||
migration_source = migration_source.lines.to_a[1..-1].join
|
||||
end
|
||||
|
||||
migration_source
|
||||
|
||||
@@ -2258,7 +2258,7 @@ if ActiveRecord::Base.connection.supports_migrations?
|
||||
|
||||
# remove origin comment
|
||||
migration = @migrations_path + "/4_people_have_hobbies.rb"
|
||||
migration_source = File.read(migration).to_a[1..-1].join
|
||||
migration_source = File.read(migration).lines.to_a[1..-1].join
|
||||
File.open(migration, "w") { |f| f.write migration_source }
|
||||
|
||||
ActiveRecord::Migration.copy(@migrations_path, sources, :on_skip => on_skip)
|
||||
|
||||
Reference in New Issue
Block a user