rua 0.1.1-mswin32 → 0.1.2-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +12 -4
- data/lib/i386-mswin32/rua.so +0 -0
- metadata +1 -1
data/README.txt
CHANGED
@@ -10,7 +10,11 @@ Rua is a library for using Lua under Ruby.
|
|
10
10
|
|
11
11
|
require 'rua'
|
12
12
|
|
13
|
-
|
13
|
+
error_handler = lambda do |e|
|
14
|
+
p e
|
15
|
+
end
|
16
|
+
|
17
|
+
rua = Rua.new(error_handler)
|
14
18
|
rua.openlibs(:all)
|
15
19
|
#rua.openlibs(:base, :package, :string)
|
16
20
|
#rua.secure = false
|
@@ -18,15 +22,19 @@ Rua is a library for using Lua under Ruby.
|
|
18
22
|
rua[:str] = 'xxx'
|
19
23
|
rua[:num] = 100
|
20
24
|
rua[:proc] = lambda do
|
21
|
-
puts '
|
25
|
+
puts 'proc called.'
|
26
|
+
end
|
27
|
+
rua[:err] = lambda do
|
28
|
+
raise 'err called.'
|
22
29
|
end
|
23
30
|
|
24
|
-
puts rua.eval(
|
31
|
+
puts rua.eval(<<-EOS)
|
25
32
|
print('hello Rua!')
|
26
33
|
print(str)
|
27
34
|
print(num)
|
28
35
|
proc()
|
29
|
-
|
36
|
+
err()
|
37
|
+
|
30
38
|
f = function()
|
31
39
|
print('f() called.')
|
32
40
|
end
|
data/lib/i386-mswin32/rua.so
CHANGED
Binary file
|