Skip to content

Commit

Permalink
* bignum.c (rb_big2str0): round up for the most significant digit.
Browse files Browse the repository at this point in the history
  [ruby-core:10686]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Mar 21, 2007
1 parent e6e5674 commit df896a0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Wed Mar 21 17:04:30 2007 Nobuyoshi Nakada <[email protected]>

* bignum.c (rb_big2str0): round up for the most significant digit.
[ruby-core:10686]

Tue Mar 21 08:20:00 2007 Nathaniel Talbott <[email protected]>

* test/testunit/collector/test_dir.rb: Fixed test/unit tests that
Expand Down
8 changes: 4 additions & 4 deletions bignum.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,21 +601,21 @@ rb_big2str0(VALUE x, int base, int trim)
j = j * 53L / 84 + 1;
break;
case 4: case 5: case 6: case 7:
j /= 2;
j = (j + 1) / 2;
break;
case 8: case 9:
j /= 3;
j = (j + 2) / 3;
break;
case 10: case 11: case 12: case 13: case 14: case 15:
j = j * 28L / 93 + 1;
break;
case 16: case 17: case 18: case 19: case 20: case 21:
case 22: case 23: case 24: case 25: case 26: case 27:
case 28: case 29: case 30: case 31:
j /= 4;
j = (j + 3) / 4;
break;
case 32: case 33: case 34: case 35: case 36:
j /= 5;
j = (j + 4) / 5;
break;
default:
rb_raise(rb_eArgError, "illegal radix %d", base);
Expand Down
6 changes: 3 additions & 3 deletions version.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2007-03-20"
#define RUBY_RELEASE_DATE "2007-03-21"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20070320
#define RUBY_RELEASE_CODE 20070321
#define RUBY_PATCHLEVEL 0

#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 3
#define RUBY_RELEASE_DAY 20
#define RUBY_RELEASE_DAY 21

RUBY_EXTERN const char ruby_version[];
RUBY_EXTERN const char ruby_release_date[];
Expand Down

0 comments on commit df896a0

Please sign in to comment.