Forum: IronRuby Code Review: bigdecimal-2

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
John L. (IRONRUBY) (Guest)
on 2008-10-04 02:39
(Received via mailing list)
Attachment: bigdecimal-2.diff (0 Bytes)
tfpt review "/shelveset:bigdecimal-2;REDMOND\jflam"
Comment  :
  BigDecimal contribution from Peter Bacon D.
Curt H. (Guest)
on 2008-10-04 03:24
(Received via mailing list)
Code looks good.  There might have been less churn to have CodeContext
on each method now so that we can use it to get a Config later -- but
there's also something to be said for making it work first.

Style consistency issues:
The line endings in bigdecimal.cs appear to be a mix of LF and CRLF.
They should all be CRLF.
We tend to prefer not to say "this.varname = x"; if the symbol name
conflicts, it should be changed if possible.
Tomas M. (Guest)
on 2008-10-04 03:33
(Received via mailing list)
I noticed the file name casing is wrong: bigdecimal.cs, fraction.cs. Was
it broken by some transformation?

Tomas M. (Guest)
on 2008-10-04 04:03
(Received via mailing list)
One more note:

        // TODO: This static field need to be added to a hash on
        private static readonly BigDecimal.Config _config = new
        internal static BigDecimal.Config GetConfig() { return _config;

There is already API on RubyContext for what you need:

        public bool TryGetLibraryData(object key, out object value)
        public object GetOrCreateLibraryData(object key, Func<object>
        public bool TryAddLibraryData(object key, object value, out
object actualValue)

John L. (IRONRUBY) (Guest)
on 2008-10-05 09:25
(Received via mailing list)
I'm going ahead and removing the static field. Love the
GetOrCreateLibraryData API! :)

This topic is locked and can not be replied to.