Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[Rails 3 RC2] Rails fails to load controller whose name consists of a single character.

#5481

Steps to reproduce

  1. rails new example
  2. cd example
  3. rails g controller H
  4. rails g controller Hello
  5. Open Gemfile and add gem 'yard'
  6. rails c

    Loading development environment (Rails 3.0.0.rc2) irb(main):001:0> HelloController => HelloController irb(main):002:0> HController NameError: uninitialized constant HController

    from (irb):2
    

My yard version is 0.5.8
And Ruby - ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]

Reported by Vikrant Chaudhary · August 28th, 2010 @ 11:05 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Vikrant Chaudhary
    Vikrant Chaudhary

    The irb output isn't formatted nicely in above question. Here formatting again by indenting each line with a tab instead of 4 spaces that I did before.

    Loading development environment (Rails 3.0.0.rc2)
    irb(main):001:0> HelloController
    => HelloController
    irb(main):002:0> HController
    NameError: uninitialized constant HController
        from (irb):2
    

    August 28th, 2010 @ 11:09 AM

  2. Marjan Krekoten'
    Marjan Krekoten'

    This is yard bug. yard gem defines it's own extensions to String and other classes. Their implementation of underscore method doesn't handle situations when there are several capital letters one by one.

    August 28th, 2010 @ 11:58 AM

  3. Marjan Krekoten'
  4. José Valim
    José Valim
    • State changed from new to invalid
    • Importance changed from to Low

    August 28th, 2010 @ 02:43 PM