From 67a838574be000f329c0f340474bc9cec1aeca16 Mon Sep 17 00:00:00 2001 From: Matthijs Langenberg Date: Fri, 24 Sep 2010 22:37:26 +0200 Subject: Fix broken module namespacing in ActiveResource with Ruby 1.9 [#5699 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- activeresource/test/fixtures/sound.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'activeresource/test/fixtures') diff --git a/activeresource/test/fixtures/sound.rb b/activeresource/test/fixtures/sound.rb index 5c0ef5d55c..d9d2b99fcd 100644 --- a/activeresource/test/fixtures/sound.rb +++ b/activeresource/test/fixtures/sound.rb @@ -1,5 +1,9 @@ -module Asset +module Asset class Sound < ActiveResource::Base self.site = "http://37s.sunrise.i:3000" end end + +# to test namespacing in a module +class Author +end \ No newline at end of file -- cgit v1.2.3