This project is archived and is in readonly mode.
Fix broken module namespacing in ActiveResource when using Ruby 1.9
-
gnufied
- Assigned user set to José Valim
Verified. The problem does exists and patch does fixes it. But the patch can't be applied cleanly to master, hence please create and submit a new patch.
I have the updated patch, but I will have rather original submitter submitting it again.
-
gnufied
Another option would be perhaps to check for arity of the methods rather than
RUBY_VERSION, but that results in somewhat more code. -
Matthijs Langenberg
Updated the patch. Should apply cleanly to master now.
-
Repository
- State changed from new to resolved
(from [67a838574be000f329c0f340474bc9cec1aeca16]) Fix broken module namespacing in ActiveResource with Ruby 1.9 [#5699 Fix broken module namespacing in ActiveResource when using Ruby 1.9 state:resolved]
Following namespace use case was broken with Ruby 1.9:
class Author < ActiveRecord::Base
...end
module Api
class Book < ActiveResouce::Base endend
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...
