From: Florian Gilcher Date: 2008-03-25T17:23:07+09:00 Subject: (Somewhat) undocumented Change in Ruby 1.9: Module#constants returns Symbols instead of Strings This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-18-492916834 Content-Type: multipart/mixed; boundary=Apple-Mail-17-492916755 --Apple-Mail-17-492916755 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi, one thing I came across when testing a project on Ruby 1.9.0-1: Module#constants now returns an Array of Symbols instead of an Array of Strings. Although the documentation for the Module class in trunk mentions the new form ( mod.constants => [:One, :Two]) (not in 1.9.0-1, though), the documentation for Module#constants still uses the old form. So, without further ado, here's my first patch to core :). Greetings Florian Gilcher --Apple-Mail-17-492916755 Content-Disposition: attachment; filename=consts.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="consts.diff" Content-Transfer-Encoding: 7bit Index: variable.c =================================================================== --- variable.c (revision 15837) +++ variable.c (working copy) @@ -1582,8 +1582,8 @@ * modules (example at start of section), unless the all * parameter is set to false. * - * IO.constants.include?("SYNC") => true - * IO.constants(false).include?("SYNC") => false + * IO.constants.include?(:SYNC) => true + * IO.constants(false).include?(:SYNC) => false * * Also see Module::const_defined?. */ --Apple-Mail-17-492916755 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit --Apple-Mail-17-492916755-- --Apple-Mail-18-492916834 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkfotmcACgkQJA/zY0IIRZbL5ACePU+TsQg1+vnoZI6eZfRU1i7C YHsAoIqqT14Eh0u5fSbXY/2PCguV5XOp =K1kA -----END PGP SIGNATURE----- --Apple-Mail-18-492916834--