Bug #8213
closedNo documentation for `ri YAML`
Description
I believe the RI output for YAML needs to be fixed to display more detailed information on usage. Currently, it displays nothing. I'm happy to start some documentation on the YAML const in lib/yaml.rb with any pointers in the right direction. View below for more information:
$ ri YAML # Ruby 1.9
= YAML
(from ruby core)¶
The YAML module allows you to use one of the two YAML engines that ship with
ruby. By default Psych is used but the old and unmaintained Syck may be
chosen.
See Psych or Syck for usage and documentation.
To set the YAML engine to syck:
YAML::ENGINE.yamler = 'syck'
To set the YAML engine back to psych:
YAML::ENGINE.yamler = 'psych'¶
= Constants:
ENGINE:
Allows changing the current YAML engine. See YAML for details.
$ ri YAML # Ruby 2.0.0 (and trunk)
= YAML
Also found in:
ruby core
Updated by zzak (zzak _) over 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r40499.
Lee, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/yaml.rb: Documentation for YAML module [Bug #8213]
Updated by no6v (Nobuhiro IMAI) over 11 years ago
=begin
Hi, this causes warnings as follow:
$ ruby -ryaml -ve ''
ruby 2.1.0dev (2013-04-28 trunk 40506) [x86_64-linux]
/home/nov/.rvm/rubies/ruby-head/lib/ruby/2.1.0/yaml.rb:83: warning: already initialized constant YAML
/home/nov/.rvm/rubies/ruby-head/lib/ruby/2.1.0/yaml.rb:82: warning: previous definition of YAML was here
=end
Updated by zzak (zzak _) over 11 years ago
@nobuhiro-san Thank you, I'm sorry for this mistake. Please check it now after r40509
Updated by no6v (Nobuhiro IMAI) over 11 years ago
@zzak-san It works without warnings, thank you!
Updated by Eregon (Benoit Daloze) over 11 years ago
zzak (Zachary Scott) wrote:
@nobuhiro-san Thank you, I'm sorry for this mistake. Please check it now after r40509
Is there not a way to tell rdoc to document the YAML module without declaring it in the code?
The "if false" just looks messy to me.
Updated by zzak (zzak _) over 11 years ago
@Eregon (Benoit Daloze) Hi! Yes, nobu pointed out another way here: https://twitter.com/n0kada/status/328342207511801856
Want to write a patch?
Updated by Eregon (Benoit Daloze) over 11 years ago
zzak (Zachary Scott) wrote:
@Eregon (Benoit Daloze) Hi! Yes, nobu pointed out another way here: https://twitter.com/n0kada/status/328342207511801856
Want to write a patch?
Still a bit hacky but sure I will do that :)