A
Austin Ziegler
Attn Curt Hibbs, Dave Thomas, and _why the lucky stiff:
There is a display problem with ri on Windows, and it's related to
YAML. There is a workaround available, but something needs to be
fixed somewhere -- and I don't really have time to track down which
part is actually causing problems.
Problem:
c:\Apps\Ruby\share\ri\1.8\site\Class>ri Class#superclass
------------------------------------------------------- Class#superclass
class.superclass -> a_super_class or nil
------------------------------------------------------------------------
Returns the superclass of _class_, or +nil+.
File.superclass #=> IO
IO.superclass #=> Object
Object.superclass #=> nil
share/ri/Class/superclass-i.yaml is in DOS line-ending format. When I
edit this file and save with Unix line-ending format, I get:
------------------------------------------------------- Class#superclass
class.superclass -> a_super_class or nil
------------------------------------------------------------------------
Returns the superclass of _class_, or +nil+.
File.superclass #=> IO
IO.superclass #=> Object
Object.superclass #=> nil
Big difference. This is especially important on longer descriptions
(e.g., Class itself -- which includes the class model diagram). What
can be done?
1) The Windows Installer team can work around this by doing a dos2unix
on all ri documents after compiling but before packaging.
2) The rdoc/ri generation phase should probably open the output files
as "wb", not just "w". The "b" has no useful meaning on Unix, but it
will force the documents to be written as received (e.g., no newline
translation). (ri_writer.rb lines 36, 51, others perhaps?).
3) The rdoc/ri read phase should probably open the files "rb" -- but
I'm not sure that is useful or necessary; one would think that opening
the file as "r" would do the reverse line ending translation, but it
obviously doesn't.
4) YAML::load needs to be able to detect documents that use CRLF line
endings and *not* treat them as badly as it does.
Can we get this fixed ASAP?
-austin
There is a display problem with ri on Windows, and it's related to
YAML. There is a workaround available, but something needs to be
fixed somewhere -- and I don't really have time to track down which
part is actually causing problems.
Problem:
c:\Apps\Ruby\share\ri\1.8\site\Class>ri Class#superclass
------------------------------------------------------- Class#superclass
class.superclass -> a_super_class or nil
------------------------------------------------------------------------
Returns the superclass of _class_, or +nil+.
File.superclass #=> IO
IO.superclass #=> Object
Object.superclass #=> nil
share/ri/Class/superclass-i.yaml is in DOS line-ending format. When I
edit this file and save with Unix line-ending format, I get:
------------------------------------------------------- Class#superclass
class.superclass -> a_super_class or nil
------------------------------------------------------------------------
Returns the superclass of _class_, or +nil+.
File.superclass #=> IO
IO.superclass #=> Object
Object.superclass #=> nil
Big difference. This is especially important on longer descriptions
(e.g., Class itself -- which includes the class model diagram). What
can be done?
1) The Windows Installer team can work around this by doing a dos2unix
on all ri documents after compiling but before packaging.
2) The rdoc/ri generation phase should probably open the output files
as "wb", not just "w". The "b" has no useful meaning on Unix, but it
will force the documents to be written as received (e.g., no newline
translation). (ri_writer.rb lines 36, 51, others perhaps?).
3) The rdoc/ri read phase should probably open the files "rb" -- but
I'm not sure that is useful or necessary; one would think that opening
the file as "r" would do the reverse line ending translation, but it
obviously doesn't.
4) YAML::load needs to be able to detect documents that use CRLF line
endings and *not* treat them as badly as it does.
Can we get this fixed ASAP?
-austin