Skip to content

Instantly share code, notes, and snippets.

@prakashmurthy
Last active July 9, 2016 23:58
Show Gist options
  • Save prakashmurthy/013f529ef38a14a541052e23d60df487 to your computer and use it in GitHub Desktop.
Save prakashmurthy/013f529ef38a14a541052e23d60df487 to your computer and use it in GitHub Desktop.
attempting git bisect to help with https://github.com/rails/rails/issues/25732

[master] $ git bisect start

[master] $ git bisect good fd65a9000b550509358dfdcd557c0bb882630d4e

[master] $ git bisect bad 4e961ca184d39bcc3755d017e94bf03c6e656b29

Bisecting: a merge base must be tested [ee614af6fa6c9e8cac70bcfd7d3583d0b4ff907b] Merge pull request #17812 from jonatack/patch-8 [(no branch, bisect started on master)] $ git bisect good

Bisecting: 5322 revisions left to test after this (roughly 12 steps) [e16afe61abd78c55f80752ca020b90d59ae1940f] stop applying default headers in ActionDispatch::Response [(no branch, bisect started on master)] $

1) Error:
BugTest#test_fail:
NoMethodError: undefined method `name=' for #<Person >
/Users/prakash/.rvm/gems/ruby-2.3.1/bundler/gems/rails-e16afe61abd7/activemodel/lib/active_model/attribute_methods.rb:433:in `method_missing'
pg_protocol_error.rb:70:in `test_fail'
Error message after changing the code slightly:
Original code:
person = Person.new
person.name = "FooBar"
New Code:
person = Person.new(name: "FooBar")
1) Error:
BugTest#test_fail:
ActiveModel::UnknownAttributeError: unknown attribute 'name' for Person.
/Users/prakash/Projects/rails/activerecord/lib/active_record/attribute_assignment.rb:37:in `rescue in _assign_attribute'
/Users/prakash/Projects/rails/activerecord/lib/active_record/attribute_assignment.rb:35:in `_assign_attribute'
/Users/prakash/Projects/rails/activemodel/lib/active_model/attribute_assignment.rb:40:in `block in _assign_attributes'
/Users/prakash/Projects/rails/activemodel/lib/active_model/attribute_assignment.rb:39:in `each'
/Users/prakash/Projects/rails/activemodel/lib/active_model/attribute_assignment.rb:39:in `_assign_attributes'
/Users/prakash/Projects/rails/activerecord/lib/active_record/attribute_assignment.rb:26:in `_assign_attributes'
/Users/prakash/Projects/rails/activemodel/lib/active_model/attribute_assignment.rb:33:in `assign_attributes'
/Users/prakash/Projects/rails/activerecord/lib/active_record/core.rb:305:in `initialize'
/Users/prakash/Projects/rails/activerecord/lib/active_record/inheritance.rb:61:in `new'
/Users/prakash/Projects/rails/activerecord/lib/active_record/inheritance.rb:61:in `new'
pg_protocol_error.rb:71:in `test_fail'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment