[Rails] What happened to Rails::Version::STRING in Rails 1.0.0?

Jamis Buck
Mon, 02 Jan 2006 02:55:23 -0000

On Jan 1, 2006, at 6:03 PM, Rafa? Komorowski wrote:

> Hello,
>
> Maybe it''s a silly question, but I cannot find anything in Rails
> changelog or google it out.
> There is a Rails::Version module (since version 0.14.something)
> that gives me a version number of Rails, similarily to Rails::Info
> module.
> Apparently in Rails version 1.0 (or maybe sooner) the name of the
> module was changed from ''Version'' to
''VERSION'' which breaks my
> debugging template. Is there any reason for this change?

Yup, there''s a reason. The reason is that having Rails::Version
caused conflicts with models named Version (because of the way the
auto-loading code works). Rather than rewrite the auto-loading code
(which works well enough otherwise), the quick-n-dirty solution was
to just rename the Rails::Version module to Rails::VERSION.

This issue will be revisited in later Rails releases, though, so
please don''t think this was an attempt to just sweep it under the rug.

- Jamis