Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Workaround issues with Locale aware Smalltalk methods.

Set LANG=C in maglev-ruby script.  This essentially turns off locale aware
processing in Smalltalk.  The down-side is that processes forked from
maglev-ruby will also have LANG=C.

fixes #93
  • Loading branch information...
commit ad985319c4d4ac969b1478528b8aca800c931be7 1 parent e858e17
@pbm pbm authored
Showing with 17 additions and 0 deletions.
  1. +2 −0  bin/maglev-ruby
  2. +11 −0 src/test/gh93.rb
  3. +4 −0 src/test/vmunit.conf
View
2  bin/maglev-ruby
@@ -4,6 +4,8 @@
#
# Copyright 2009-2010 GemStone Systems, Inc. All rights reserved.
+export LANG=C # see https://github.com/MagLev/maglev/issues/93
+
COMMAND="`basename $0`"
usage()
View
11 src/test/gh93.rb
@@ -0,0 +1,11 @@
+# https://github.com/MagLev/maglev/issues/93
+#
+# $ LANG="it_IT.UTF-8" maglev-ruby -e 'p Float("0.0")'
+# ERROR 2702 , invalid value for Float(): "0.0" (ArgumentError)
+
+
+expected = "0.0\n"
+x = %x{LANG="it_IT.UTF-8" maglev-ruby -e 'p Float("0.0")' }
+
+raise "Fail" unless expected == x
+
View
4 src/test/vmunit.conf
@@ -1,6 +1,10 @@
# The vmunit test list
# Testname must be relative to MAGLEV_HOME/src/test
#
+
+# Regression tests for github issues
+gh93.rb
+
# tests that do not require simple.rb
testInstVars.rb
testGlobals1.rb
Please sign in to comment.
Something went wrong with that request. Please try again.