Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #128 from jc00ke/fixnum_to_s

Fixnum#to_s should return lowercase letters
  • Loading branch information...
commit 78e90251f9d6daa3fafdd053867c4114fb566915 2 parents 500533b + e6fc17d
@timfel timfel authored
Showing with 14 additions and 1 deletion.
  1. +1 −1  src/kernel/bootstrap/Integer.rb
  2. +13 −0 src/test/gh127.rb
View
2  src/kernel/bootstrap/Integer.rb
@@ -317,7 +317,7 @@ def to_s(base)
unless base._isFixnum
raise TypeError, 'arg must be a Fixnum'
end
- __to_s_base_show(base, false)
+ __to_s_base_show(base, false).downcase
end
primitive 'truncate' , 'truncated'
View
13 src/test/gh127.rb
@@ -0,0 +1,13 @@
+# https://github.com/MagLev/maglev/issues/127
+#
+# MRI 1.8.7-p352
+#
+# >> 95.to_s(16)
+# => "5f"
+#
+# MagLev
+#
+# >> 95.to_s(16)
+# => "5F"
+require File.expand_path('simple', File.dirname(__FILE__))
+test 95.to_s(16), "5f", "Fixnum#to_s(16) should return lowercase letters"
Please sign in to comment.
Something went wrong with that request. Please try again.