summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-04-19 16:05:20 -0700
committerRandy Morgan <[email protected]>2012-04-19 16:05:20 -0700
commitfc8c56f9e1455332f6c3f10775cd11a0910b3476 (patch)
tree82295d5d6b9b4bb62d9a0df9526fd10ee470db28
parent12e506de99033957716c0937ccaf234b78fe32f5 (diff)
parentc8a6711d681d4cce4be46a8346e69c6b184e6cf6 (diff)
downloadcaxlsx-fc8c56f9e1455332f6c3f10775cd11a0910b3476.tar.gz
caxlsx-fc8c56f9e1455332f6c3f10775cd11a0910b3476.zip
Merge pull request #82 from scpike/handle-mathn
Force result of Fixnum division to integer before using
-rw-r--r--lib/axlsx.rb2
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