Permalink
Browse files

Cleaning and checking examples

  • Loading branch information...
1 parent f2a4bfb commit 78c4723a2fd151bd380c8c35a5631afb415e960c @rifraf committed May 2, 2010
View
@@ -17,4 +17,6 @@ IREmbeddedApp.4.5.resharper.user
**/Iron*.dll
**/Micro*.dll
**/*.pdb
-**/*.suo
+*.suo
+**/*.suo
+**/*.user
@@ -1,6 +1,6 @@
puts "$0 is #{$0}"
puts "__FILE__ is #{__FILE__}"
-puts "There are #{ARGV.length} command-line arguments"
+puts "There are #{ARGV.length} command-line arguments (ARGV)"
ARGV.each_with_index do |arg, index|
puts "#{index}: #{arg}"
end
@@ -12,8 +12,16 @@
doc = Document.new(string)
doc.write $stdout
-doc = Document.new File.new("mydoc.xml")
+#??????????? Next line bust at the moment...
+#doc = Document.new File.new("mydoc.xml")
+#???????????
+s = SerfSupp.read_embedded_file("mydoc.xml")
+doc = Document.new(s)
+#doc.write $stdout
+#???????????
+
doc.elements.each("inventory/section") { |element| puts element.attributes["name"] }
+p __LINE__
# -> health
# -> food
doc.elements.each("*/section/item") { |element| puts element.attributes["upc"] }
@@ -31,3 +39,4 @@
puts root.elements[1].attributes["name"]
# -> health (returns the FIRST child element)
root.detect {|node| node.kind_of? Element and node.attributes["name"] == "food" }
+p __LINE__
View
@@ -22,7 +22,7 @@ class Program {
// list_args.rb
Console.WriteLine("list_args.rb");
- Console.WriteLine("----------");
+ Console.WriteLine("------------");
try {
EmbeddedRuby er1 = new EmbeddedRuby();
er1.Mount("Applications");
@@ -43,7 +43,7 @@ class Program {
Console.WriteLine(e.Message);
}
Console.WriteLine();
-return 1;
+
// rexml
Console.WriteLine("test_rexml.rb");
Console.WriteLine("-------------");
@@ -72,7 +72,7 @@ public class EmbeddedRuby {
}
// Prefix bootstrap with $0 and ARGV
string boot = String.Format(
- "$0='/{0}' {1}{2}",
+ "$0='/{0}'\n{1}{2}",
app, argv, _serfs.Read("bootstrap.rb")
);
ScriptSource source = _engine.CreateScriptSourceFromString(boot, "bootstrap.rb", SourceCodeKind.File);
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
@@ -1,4 +0,0 @@
-@echo off
-rem /wildcards
-"C:\Program Files\Microsoft\ILMerge\ILMerge.exe" /out:merge\msinatra.exe IRSinatra.exe IREmbeddedLibraries.dll IREmbeddedApp.dll Serfs.dll
-pause
Binary file not shown.

0 comments on commit 78c4723

Please sign in to comment.