timelimit | 8 Oct 07:34
Favicon

来自timelimit的邮件

 unsubscribe
 
 
Chris White | 20 Aug 03:11
Favicon
Gravatar

Documentation Translations

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

Chris White | 29 Jul 21:16
Favicon
Gravatar

ObjectSpace#each_object example issue


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
 		 	   		  

Hazins, Kalman | 12 Jul 19:22
Favicon

alias - error in documentation

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

Roger Newton | 4 Jul 17:45
Favicon

(unknown)

unsubscribe

Loren Sands-Ramshaw | 13 May 17:01
Picon
Gravatar

Array and Enum: Elements or Objects?

The documentation in array.c and enum.c uses the terms elements and objects inconsistently. Currently there are 100 elements and 18 objects in array.c and 59 elements and 21 objects in enum.c. I think element is the most widely-used term for things in an array. For enum I can see the argument for object given the range of things that can be enumerable, but wikipedia uses element to refer to the things that are being enumerated. Should I make everything in array.c element and everything in enum.c object, or just everything element? Or something else?

Thanks,
Loren
mathew | 6 May 16:06
Picon
Favicon
Gravatar

Date, Time, DateTime -- documentation improvements

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/>

program uni | 18 Apr 22:40
Picon

Re: Welcome to our (ruby-doc ML) You are added automatically



On Mon, Apr 18, 2011 at 11:39 PM, <ruby-doc-admin <at> ruby-lang.org> wrote:
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



Dorian . | 10 Apr 16:36
Picon
Gravatar

Little issue in Array#compact! doc

Hi, if you look at Array#compact! doc, you can see there is :

Removes nil elements from the array. Returns nil if no changes were made, otherwise returns </i>ary</i>.

So there is little issur with HTML markup, it should be

Removes nil elements from the array. Returns nil if no changes were made, otherwise returns <i>ary</i>.



Slevin McGuigan | 5 Dec 22:29

Class:Hash

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 | 28 Nov 19:27
Picon
Favicon

Joseph Jones wants to be your friend on Windows Live


Gmane