Hi,

The behavior feels like a bug that's why I posted it here.

Kind of strange when I explicitly require base class and the inheritance 
still goes wrong.

 

> Hi Ilya,
>
> This is not the appropriate mailing list for that, this one is only to 
> discuss rails core features and bugs, but try to inherit from ::Base, 
> instead of Base.
>
> On Wednesday, 11 June 2014, Ilya Kantor <ili...@gmail.com <javascript:>> 
> wrote:
>
>> Hi,
>>
>> I have Parser::Typography::CharTypographer, in 
>> parser/typography/char_typographer.rb:
>> ```
>> require File.expand_path("../base", __FILE__)
>>
>> module Parser
>>
>>   module Typography
>>
>>     class CharTypographer < Base
>>         ...
>> ```
>>
>> Sometimes (not always) it inherits from Parser::Base as seen in debugger:
>> ```
>> [34, 43] in /private/var/site/js-dev/lib/parser/node/tag.rb
>> => 39:         typographer = Typography::CharTypographer.new
>> (byebug) Typography::CharTypographer.superclass
>> Parser::Base
>> ```
>>
>> How can this happen?!? 
>> I explicitly include 'base.rb' from current directory in the first line!
>>
>> P.S. Here's the files layout : 
>> http://ilyakantor.ru/screen/2014-06-11_2229.png
>> Inheritance should happen from the first base, not the second one.
>>
>>
>>
>>
>>
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby on Rails: Core" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to rubyonrails-core+unsubscr...@googlegroups.com.
>> To post to this group, send email to rubyonrails-core@googlegroups.com.
>> Visit this group at http://groups.google.com/group/rubyonrails-core.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> Cumprimentos,
>  Luís Ferreira
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-core+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-core@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to