This project is archived and is in readonly mode.

Changeset [67a838574be000f329c0f340474bc9cec1aeca16] by Matthijs Langenberg

September 27th, 2010 @ 10:10 PM

Fix broken module namespacing in ActiveResource with Ruby 1.9 [#5699 state:resolved]

Following namespace use case was broken with Ruby 1.9:

class Author < ActiveRecord::Base

...

end

module Api

class Book < ActiveResouce::Base
end

end

Let's say XML contains John....

Api::Book.first.author.class.to_s #=>

Ruby 1.8.7: "Api::Book::Author" (namespaced, correct),
Ruby 1.9: "Author" (toplevel, broken)

Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/67a838574be000f329c0f340474bc9...

Committed by Matthijs Langenberg

  • M activeresource/lib/active_resource/base.rb
  • M activeresource/test/abstract_unit.rb
  • M activeresource/test/cases/base_test.rb
  • M activeresource/test/fixtures/sound.rb

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>