Index: bench/bench_io_foreach.rb
===================================================================
--- bench/bench_io_foreach.rb	(revision 8709)
+++ bench/bench_io_foreach.rb	(working copy)
@@ -2,13 +2,17 @@
 
 MAX  = 1000
 BLOCKSIZE = 16 * 1024
-LINES = 10000
+LINE_SIZE = 10000
+LINES = 10
 FILE = 'io_test_bench_file.txt'
 
 File.open(FILE, 'w'){ |fh|
-   LINES.times{ |n|
-      fh.puts "This is line: #{n}"
-   }
+  LINES.times{ |n|
+    LINE_SIZE.times { |t|
+      fh.print "This is time: #{t} "
+    }
+    fh.puts
+  }
 }
 stat = File.stat(FILE)
 (ARGV[0] || 5).to_i.times do
Index: src/org/jruby/util/Sprintf.java
===================================================================
--- src/org/jruby/util/Sprintf.java	(revision 8709)
+++ src/org/jruby/util/Sprintf.java	(working copy)
@@ -1361,8 +1361,8 @@
         if (arg instanceof RubyFixnum) {
             // relatively cheap test for 32-bit values
             longval = ((RubyFixnum)arg).getLongValue();
-            if (longval >= (long)Integer.MIN_VALUE << 1) {
-                return Convert.longToCharBytes((((long)Integer.MAX_VALUE + 1L) << 1) + longval);
+            if (longval >= Long.MIN_VALUE << 1) {
+                return Convert.longToCharBytes(((Long.MAX_VALUE + 1L) << 1) + longval);
             }
             // no such luck...
             bigval = BigInteger.valueOf(longval);
Index: src/org/jruby/RubyKernel.java
===================================================================
--- src/org/jruby/RubyKernel.java	(revision 8709)
+++ src/org/jruby/RubyKernel.java	(working copy)
@@ -1185,11 +1185,11 @@
 
         // Not sure how well this works, but it works much better than
         // just currentTimeMillis by itself.
+        long oldRandomSeed = runtime.getRandomSeed();
         runtime.setRandomSeed(System.currentTimeMillis() ^
                recv.hashCode() ^ runtime.incrementRandomSeedSequence() ^
                runtime.getRandom().nextInt(Math.max(1, Math.abs((int)runtime.getRandomSeed()))));
 
-        long oldRandomSeed = runtime.getRandomSeed();
         runtime.getRandom().setSeed(runtime.getRandomSeed());
         return runtime.newFixnum(oldRandomSeed);
     }

