[xruby commit] r2317 - in trunk: . benchmark doc sample src src/com/xruby/compiler

1 view
Skip to first unread message

codesite...@google.com

unread,
Mar 23, 2008, 11:55:12 PM3/23/08
to xruby-...@googlegroups.com
Author: xue.yong.zhi
Date: Sun Mar 23 20:54:55 2008
New Revision: 2317

Modified:
trunk/README.txt
trunk/benchmark/run.rb
trunk/doc/HackingGuide.htm
trunk/doc/HackingGuide_cn.htm
trunk/sample/test_system.rb
trunk/src/builtin.rb
trunk/src/com/xruby/compiler/RubyCompiler.java

Log:
0.3.3

Modified: trunk/README.txt
==============================================================================
--- trunk/README.txt (original)
+++ trunk/README.txt Sun Mar 23 20:54:55 2008
@@ -22,17 +22,17 @@
Usage
=====================
* Compile a ruby script then run:
->java -jar xruby-0.3.2.jar -c test.rb
+>java -jar xruby-0.3.3.jar -c test.rb
>java -jar test.jar

If xruby.jar and test.jar are not in the same folder, then should be:
->java -cp xruby-0.3.2.jar;test.jar xruby.test.main
+>java -cp xruby-0.3.3.jar;test.jar xruby.test.main

* Run script directly (compile behind the scene):
->java -jar xruby-0.3.2.jar test.rb
+>java -jar xruby-0.3.3.jar test.rb

Some ruby scripts require large amount of memory, if you see OutOfMemoryError,
try to increase the maximum heap size with -Xmx parameter:
->java -Xmx512m -jar xruby-0.3.2.jar test.rb
+>java -Xmx512m -jar xruby-0.3.3.jar test.rb

Modified: trunk/benchmark/run.rb
==============================================================================
--- trunk/benchmark/run.rb (original)
+++ trunk/benchmark/run.rb Sun Mar 23 20:54:55 2008
@@ -37,7 +37,7 @@
print file, "\t"
run_command "ruby #{file}"
print "\t"
- run_command "java -jar xruby-0.3.2.jar #{file}"
+ run_command "java -jar xruby-0.3.3.jar #{file}"
print "\n"
end
end

Modified: trunk/doc/HackingGuide.htm
==============================================================================
--- trunk/doc/HackingGuide.htm (original)
+++ trunk/doc/HackingGuide.htm Sun Mar 23 20:54:55 2008
@@ -75,7 +75,7 @@
we save the above code as test.rb, and then compile it using XRuby:

<pre>
-java -jar xruby-0.3.2.jar -c test.rb
+java -jar xruby-0.3.3.jar -c test.rb
</pre>

Then we get test.jar file, we can run the program with the following command:

Modified: trunk/doc/HackingGuide_cn.htm
==============================================================================
--- trunk/doc/HackingGuide_cn.htm (original)
+++ trunk/doc/HackingGuide_cn.htm Sun Mar 23 20:54:55 2008
@@ -64,7 +64,7 @@
</pre>
���ǽ�����Ĵ����Ϊtest.rb��ʹ��XRuby���룺
<pre>
-java -jar xruby-0.3.2.jar -c test.rb
+java -jar xruby-0.3.3.jar -c test.rb
</pre>
Ȼ�����ǵõ�һ��test.jar�ļ���ִ���������������������

Modified: trunk/sample/test_system.rb
==============================================================================
--- trunk/sample/test_system.rb (original)
+++ trunk/sample/test_system.rb Sun Mar 23 20:54:55 2008
@@ -4,18 +4,18 @@
test_ok(`echo foobar` == "foobar\n")
#cmd on windows will remove double quote automatically from command line, so we have to change the test
if RUBY_PLATFORM == 'mswin32'
-test_ok(`java -jar xruby-0.3.2.jar -e 'print 'foobar''` == 'foobar')
+test_ok(`java -jar xruby-0.3.3.jar -e 'print 'foobar''` == 'foobar')
else
-test_ok(`java -jar xruby-0.3.2.jar -e 'print "foobar"'` == 'foobar')
+test_ok(`java -jar xruby-0.3.3.jar -e 'print "foobar"'` == 'foobar')
end
tmp = open("script_tmp", "w")
tmp.print "print $zzz\n";
tmp.close

-test_ok(`java -jar xruby-0.3.2.jar -s script_tmp -zzz` == 'true')
+test_ok(`java -jar xruby-0.3.3.jar -s script_tmp -zzz` == 'true')
#java will remove '=' automatically from command line, so we have to change the test
-#test_ok(`java -jar xruby-0.3.2.jar -s script_tmp -zzz=555` == '555')
-test_ok(`java -jar xruby-0.3.2.jar -s script_tmp "-zzz=555"` == '555')
+#test_ok(`java -jar xruby-0.3.3.jar -s script_tmp -zzz=555` == '555')
+test_ok(`java -jar xruby-0.3.3.jar -s script_tmp "-zzz=555"` == '555')

tmp = open("script_tmp", "w")
tmp.print "#! /usr/local/bin/ruby -s\n";
@@ -23,8 +23,8 @@
tmp.close

#java will remove '=' automatically from command line, so we have to change the test
-#test_ok(`java -jar xruby-0.3.2.jar script_tmp -zzz=678` == '678')
-test_ok(`java -jar xruby-0.3.2.jar script_tmp "-zzz=678"` == '678')
+#test_ok(`java -jar xruby-0.3.3.jar script_tmp -zzz=678` == '678')
+test_ok(`java -jar xruby-0.3.3.jar script_tmp "-zzz=678"` == '678')

tmp = open("script_tmp", "w")
tmp.print "this is a leading junk\n";
@@ -34,10 +34,10 @@
tmp.print "this is a trailing junk\n";
tmp.close

-test_ok(`java -jar xruby-0.3.2.jar -x script_tmp` == 'nil')
+test_ok(`java -jar xruby-0.3.3.jar -x script_tmp` == 'nil')
#java will remove '=' automatically from command line, so we have to change the test
-#test_ok(`java -jar xruby-0.3.2.jar -x script_tmp -zzz=555` == '555')
-test_ok(`java -jar xruby-0.3.2.jar -x script_tmp "-zzz=555"` == '555')
+#test_ok(`java -jar xruby-0.3.3.jar -x script_tmp -zzz=555` == '555')
+test_ok(`java -jar xruby-0.3.3.jar -x script_tmp "-zzz=555"` == '555')

tmp = open("script_tmp", "w")
for i in 1..5
@@ -45,8 +45,8 @@
end
tmp.close

-#`java -jar xruby-0.3.2.jar -i.bak -pe 'sub(/^[0-9]+$/){$&.to_i * 5}' script_tmp`
-`java -jar xruby-0.3.2.jar -i.bak -pe "sub(/^[0-9]+$/){$&.to_i * 5}" script_tmp`
+#`java -jar xruby-0.3.3.jar -i.bak -pe 'sub(/^[0-9]+$/){$&.to_i * 5}' script_tmp`
+`java -jar xruby-0.3.3.jar -i.bak -pe "sub(/^[0-9]+$/){$&.to_i * 5}" script_tmp`
done = true
tmp = open("script_tmp", "r")
while tmp.gets

Modified: trunk/src/builtin.rb
==============================================================================
--- trunk/src/builtin.rb (original)
+++ trunk/src/builtin.rb Sun Mar 23 20:54:55 2008
@@ -1139,4 +1139,4 @@
class Interrupt < SignalException
end

-ENV["RUBY"] = 'java -jar xruby-0.3.2.jar'
+ENV["RUBY"] = 'java -jar xruby-0.3.3.jar'

Modified: trunk/src/com/xruby/compiler/RubyCompiler.java
==============================================================================
--- trunk/src/com/xruby/compiler/RubyCompiler.java (original)
+++ trunk/src/com/xruby/compiler/RubyCompiler.java Sun Mar 23 20:54:55 2008
@@ -22,7 +22,7 @@

public class RubyCompiler {

- public static final String VERSION = "0.3.2";
+ public static final String VERSION = "0.3.3";

private RubyBinding binding_;
private boolean strip_;

Reply all
Reply to author
Forward
0 new messages