diff options
| author | Stephen Pike <[email protected]> | 2012-04-19 15:35:14 -0400 |
|---|---|---|
| committer | Stephen Pike <[email protected]> | 2012-04-19 15:35:14 -0400 |
| commit | c8a6711d681d4cce4be46a8346e69c6b184e6cf6 (patch) | |
| tree | 82295d5d6b9b4bb62d9a0df9526fd10ee470db28 /lib | |
| parent | 12e506de99033957716c0937ccaf234b78fe32f5 (diff) | |
| download | caxlsx-c8a6711d681d4cce4be46a8346e69c6b184e6cf6.tar.gz caxlsx-c8a6711d681d4cce4be46a8346e69c6b184e6cf6.zip | |
# Force result of Fixnum division to Fixnum
The mathn library overrides Fixnum division to return a rational, so
`1/2 => (1/2)` instead of `1/2 => 0`. Axslx calls chr on the result of
Fixnum division, which is incompatible. Fix it by forcing to integer.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/axlsx.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx.rb b/lib/axlsx.rb index 46d1c9bf..6fce32b5 100644 --- a/lib/axlsx.rb +++ b/lib/axlsx.rb @@ -71,7 +71,7 @@ module Axlsx chars = [] while index >= 26 do chars << ((index % 26) + 65).chr - index = index / 26 - 1 + index = (index / 26).to_i - 1 end chars << (index + 65).chr chars.reverse.join |
