Documentation Translations
2011-08-20 01:11:54 GMT
Hello Everyone, I had someone approach me earlier about helping out with Spanish translations of the Ruby documentation. With that in mind I'd like to get a feel for what, if at any, progress has been made to translate the Ruby documentation into something other than English (or Japanese if there is any untranslated documentation). The objective of this is to try and get a documentation translation team together, and start to centralize activity. Please respond on or off list if you have interest or know of existing translation projects. Regards, Chris White http://www.twitter.com/cwgem
ObjectSpace#each_object example issue
2011-07-29 19:16:55 GMT
The documentation for ObjectSpace#each_object has the following sample code:
* a = 102.7
* b = 95 # Won't be returned
* c = 12345678987654321
* count = ObjectSpace.each_object(Numeric) {|x| p x }
* puts "Total count: #{count}"
*
* <em>produces:</em>
*
* 12345678987654321
* 102.7
* 2.71828182845905
* 3.14159265358979
* 2.22044604925031e-16
* 1.7976931348623157e+308
* 2.2250738585072e-308
* Total count: 7
In this case, c, with the value of 12345678987654321 is supposed to show for being a Bignum. However on 64 bit
systems this isn't the case:
= 64bit MacOSX Ruby SVN HEAD =
irb(main):001:0> puts RUBY_VERSION + " " + RUBY_PLATFORM + " " + RUBY_PATCHLEVEL.to_s
1.9.2 x86_64-darwin10.8.0 290
=> nil
irb(main):002:0> 12345678987654321.class
=> Fixnum
This won't show because as explained, "Immediate objects (Fixnums, Symbols true, false, and nil) are
never returned." One a 32 bit system, however, this isn't an issue:
= 32bit Ubuntu Ruby SVN HEAD
irb(main):001:0> puts RUBY_VERSION + " " + RUBY_PLATFORM + " " + RUBY_PATCHLEVEL.to_s
1.9.4 i686-linux -1
=> nil
irb(main):002:0> 12345678987654321.class
=> Bignum
I see two possible solutions to this:
1) Use a number that produces Bignum on both 32 an 64 bit systems:
irb(main):003:0> 12345678987654321094903903903.class
=> Bignum
2) Split out the explanation to show 32 and 64 bit side by side?
3) Just add a side not explaining the issue with 32 and 64 bit differences
Also there might be another potential fix if there is some constant that holds the min and max values Bignum
is capable of, but that's more of a feature request than a change in the docs.
- Chris
Twitter: @cwgem
alias - error in documentation
2011-07-12 17:22:47 GMT
All, I believe I found an error in the documentation for a ruby keyword - alias. The documentation, under 1.9 keywords link=> alias, states that p.full_name = "David" # Please use fullname= I believe the comment is incorrect. The full_name= is still referencing the old name= definition and not the newly defined one. (I have of course verified my hypothesis by actually running the code.) Hope this is useful, -Kalman Hazins
Array and Enum: Elements or Objects?
2011-05-13 15:01:40 GMT
Date, Time, DateTime -- documentation improvements
Date, Time, DateTime -- documentation improvements
2011-05-06 14:06:34 GMT
Someone on Reddit recently pointed at the documentation for Date as an example of Ruby being inferior to that other language, citing the number of undocumented methods, and methods like floor() that have no obvious meaning for a date. So I'm considering taking a pass at cleaning up the RubyDoc for date. Before I do, I'm wondering if there are any methods which aren't supposed to be part of the API? Things like dhms_to_delta and divmod don't look as though they should be a guaranteed feature of a date/time API. mathew -- -- <URL:http://www.pobox.com/~meta/>
Re: Welcome to our (ruby-doc ML) You are added automatically
2011-04-18 20:40:24 GMT
Caution: If you reply this mail, the recipient is mailing list!
post articles <ruby-doc <at> ruby-lang.org>
commands <ruby-doc-ctl <at> ruby-lang.org>
maintainer <ruby-doc-admin <at> ruby-lang.org>
Welcome to our mailing list <ruby-doc <at> ruby-lang.org> !
This mail contains the fundamental usage of the mailing list server.
1 How to use this server
Please send commands in the mail body not subject to the address
<ruby-doc-ctl <at> ruby-lang.org>.
The command syntax is as follows:
help
mget last:10 mp
Please send the "help" to the address <ruby-doc-ctl <at> ruby-lang.org> for help and
server functions overview
help
to get general information on this list
guide
If you want to make a contact with the mailing list maintainer, please
e-mail to
ruby-doc-admin <at> ruby-lang.org
ML server exists to decrease routine works by maintainers. Please try
to use server functions as could as possible.
ruby-doc <at> ruby-lang.org Maintainer
ruby-doc-admin <at> ruby-lang.org
Little issue in Array#compact! doc
2011-04-10 14:36:16 GMT
Removes nil elements from the array. Returns nil if no changes were made, otherwise returns </i>ary</i>.
Removes nil elements from the array. Returns nil if no changes were made, otherwise returns <i>ary</i>.
Class:Hash
2010-12-05 21:29:34 GMT
Hi *,
I am new to ruby and new to this mailinglist. I hope my question isn't too simple to be coped with. But as I want to get involved in the ruby community I choosed this one as a lightweight issue to start with.
I stumbled about the behaviour of Hash#key (which is a strange method anyway, imho. I guess I won't ever use it). The behavior of #key isn't obvious in case there is more then one occurance of the key
testhash = {
'1' => 'a',
'2' => 'b',
'3' => 'a'
}
puts "#{testhash.key('a')}" # => 1
testhash.delete('1')
puts "#{testhash.key('a')}" # => 3
http://rdoc.info/docs/ruby-core/1.9.2/Hash sais that "Hashes enumerate their values in the order that the corresponding keys were inserted" Hence the behavior is following the documentation (or vice versa)
But both http://rdoc.info/docs/ruby-core/1.9.2/Hash#key-instance_method and http://www.ruby-doc.org/ruby-1.9/classes/Hash.html#M000387 only say "Returns the key for a given value. If not found, returns nil".
And question #1 is: What is the best place too look/the official documentation? And is this mailing list the proper way to discuss documentation flaws?
And question #1 is: Shouldn't there be something in the documentation of hash#key like "... If there is more then one occurance of the key the first value is returned"
Best Regards,
Slevin
--
My system: Ubuntu 9.10, ruby 1.9.1
egon <at> egon:/home/egon> uname -a
Linux egon 2.6.31-22-generic #68-Ubuntu SMP Tue Oct 26 16:38:35 UTC 2010 i686 GNU/Linux
egon <at> egon:/home/egon> cat /etc/lsb\-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu 9.10"
egon <at> egon:/home/egon> ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [i486-linux]
Joseph Jones wants to be your friend on Windows Live
2010-11-28 18:27:25 GMT
| ||||
| Notifications preferences | SMS notifications | Microsoft privacy statement |
RSS Feed