superscript 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/superscript/runner.rb +14 -7
- data/lib/superscript/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d83e94427d9c10ab8ca7ee333c4db61b44386edd6f94406e0003732201b14e2
|
4
|
+
data.tar.gz: 80f4397496b955e74c059821211af3e9bf6bd46de068ccf143b9da69158008c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 529562cede40c747905870df572a1f8e2be531f887cbad1f8f740530904c7d0e1cef506810c34259b4d5c1974f26a269190c696e51c7e048f0c3c38dbeb89a63
|
7
|
+
data.tar.gz: 2589dae0ab11a04928358b789d9f70f8b61acc0325882180114344cd5af1b2e838cf9c140758949fd8448fce7f6c1c0b8df93b79144e2668a88e462d681785e5
|
data/Gemfile.lock
CHANGED
data/lib/superscript/runner.rb
CHANGED
@@ -14,7 +14,9 @@ module Superscript
|
|
14
14
|
|
15
15
|
@armed = false
|
16
16
|
trace = TracePoint.new do |tp|
|
17
|
-
|
17
|
+
if ENV["SUPERSCRIPT_DEBUG"]
|
18
|
+
p [@armed, tp.path, tp.lineno, tp.method_id, tp.event, tp.defined_class]
|
19
|
+
end
|
18
20
|
|
19
21
|
if tp.defined_class.name == "BasicObject" && tp.method_id == :instance_eval
|
20
22
|
if tp.event == :script_compiled
|
@@ -34,12 +36,17 @@ module Superscript
|
|
34
36
|
when :line
|
35
37
|
puts "< " + contents.split("\n")[tp.lineno - 1]
|
36
38
|
when :c_call
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
next if ["String","Float", "Integer"].include? tp.defined_class.name
|
40
|
+
case tp.method_id
|
41
|
+
when :singleton_method_added
|
42
|
+
puts "Error: Deffining methods is not allowed"
|
43
|
+
trace.disable
|
44
|
+
exit 1
|
45
|
+
else
|
46
|
+
puts "Error: Command not found '#{tp.method_id}'"
|
47
|
+
trace.disable
|
48
|
+
exit 1
|
49
|
+
end
|
43
50
|
when :call
|
44
51
|
if tp.defined_class.name == "Superscript::Ctx"
|
45
52
|
@armed = false
|
data/lib/superscript/version.rb
CHANGED