From: Aaron Patterson Date: 2011-01-11T14:15:23+09:00 Subject: [ruby-core:34328] Re: ext/bigdecimal/lib/bigdecimal/util.rb --Kj7319i9nmIyA2yE Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 11, 2011 at 01:23:47PM +0900, Kenta Murata wrote: > Hi Aaron and Matz, >=20 > 2011/1/11 Yukihiro Matsumoto : > > Hi, > > > > In message "Re: [ruby-core:34318] ext/bigdecimal/lib/bigdecimal/util.rb" > > =A0 =A0on Tue, 11 Jan 2011 09:17:15 +0900, Aaron Patterson writes: > > > > |It looks like ext/bugdecimal/lib/bigdecimal/util.rb is only > > |conditionally required by bigdecimal.c: > > | > > | =A0https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/bigdecimal.= c#L148-151 > > | > > |Could we possibly change this to just require 'util.rb' all the time? > > > > I'd rather like to remove the dependency of util.rb from the > > bigdecimal core. >=20 > I've wrote an another patch without requiring bigdecimal/util.rb. >=20 > https://gist.github.com/774012 >=20 > If it doesn't have any problems, I'll commit tonight. This doesn't do what I want. I want a generic way to convert Numeric types to BigDecimal. util.rb half-way implements Numeric =3D> BigDecimal conversion. See [ruby-core:34326] for examples. If you like, I can write tests along with a patch to demonstrate. :-) --=20 Aaron Patterson http://tenderlovemaking.com/ --Kj7319i9nmIyA2yE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iQEcBAEBAgAGBQJNK+YIAAoJEJUxcLy0/6/Gy7AH/RB0rIYs67m+bZJ5fbZJlLC7 r6lXAiy7i1IN6o6HhA6Hw0y1YxrbV6oB/IDvX37t1VulUiqP1PbxM94oVVILSwCI 0nckCVaF+ArMCWJJnbpgbl9WE6SEHtrjpXew/KlMDSqMnLy6ymGULYCWi4rLgiyV AjEomdsQPxRhSKItuxcoijQ8OkJPfOJmGawRv4zXz8EzVo2DhwCN8yAaRylddwVS sHEn2wh+UFfPy4VZT2z7Fsc5PqccVMcXKcDCPb9Nul75WyUXjNhkChDImTda5kCH kG1tDsgGZyjiV+Mucb8uvlsFwYpLWLLXKyk/WpDSnGu4iAELx0phCRSnmXdy7Ik= =BMLy -----END PGP SIGNATURE----- --Kj7319i9nmIyA2yE--