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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb201a3a41914340c60d7f07b585c7ff699ce23df79bc6e4902b8423e3e24ccd
4
- data.tar.gz: d929702d220e470e9b99ec543808480d1509b56db1c41cb27072a19e1ca5eba8
3
+ metadata.gz: 3d83e94427d9c10ab8ca7ee333c4db61b44386edd6f94406e0003732201b14e2
4
+ data.tar.gz: 80f4397496b955e74c059821211af3e9bf6bd46de068ccf143b9da69158008c7
5
5
  SHA512:
6
- metadata.gz: 299732239cb63cdca05751ff18a9b65da05af80cb6e7451fc8d808ae9668f7817e3bcee06de6096db850063982a9fb08a100a3c32087bb13d615cca52147e2d3
7
- data.tar.gz: fb5c8796aaf57b948263ceeafdd0beb9cc38ab97e26c35730b62b0b0c0fb8fa68922d8a52e26594eddad3d4e33999c2e5468b9012368c82579832031a5b0872a
6
+ metadata.gz: 529562cede40c747905870df572a1f8e2be531f887cbad1f8f740530904c7d0e1cef506810c34259b4d5c1974f26a269190c696e51c7e048f0c3c38dbeb89a63
7
+ data.tar.gz: 2589dae0ab11a04928358b789d9f70f8b61acc0325882180114344cd5af1b2e838cf9c140758949fd8448fce7f6c1c0b8df93b79144e2668a88e462d681785e5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- superscript (0.2.0)
4
+ superscript (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -14,7 +14,9 @@ module Superscript
14
14
 
15
15
  @armed = false
16
16
  trace = TracePoint.new do |tp|
17
- #p [@armed, tp.path, tp.lineno, tp.method_id, tp.event, tp.defined_class]
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
- @armed = false
38
- trace.disable
39
-
40
- puts "Error: Command not found '#{tp.method_id}'"
41
-
42
- exit 1
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
@@ -1,3 +1,3 @@
1
1
  module Superscript
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superscript
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matti Paksula