ditto_code 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dittocode/parse.rb +4 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad4ecfcfac429c037a6d0c9bb543e2ade3594fea
4
- data.tar.gz: 3de061072bc52d8052dfe5f55c9cfcff09671b6d
3
+ metadata.gz: 0987b9b84f58ba555e6872dbe7213b5426fa0341
4
+ data.tar.gz: cb09974765f86b9a1474b3dfdd61f3a404af31fc
5
5
  SHA512:
6
- metadata.gz: 44ab1072370ac9e39ffcb1950b529d1ee06dba58823454701523d5b0e03334ab02fd7667d71aa9c73abc2e827133ebf4fb867a29d9fd10dfb87a7569f3dda3e1
7
- data.tar.gz: 02f84b8d808f653b83667f189c6766f22a1a4801e0ee78eaf779c3358dc7c058aab794fac51e3c9b73303d2def68a03b2858807e52105e2cb7b9ba974f278fc8
6
+ metadata.gz: a4e8ba5a32a01c3c562eab6a872786dd488c95a5dd5a20ca37c8c23ce5e3e5a327c72c1883b0f292b7490f9e0e99ee99284187ee2111b5e3c87d3dab288fd6ae
7
+ data.tar.gz: 928027d05c290c2d7bba7077391638fac36bac06a8c5b2a105465251a93ec5eb709a66183f8af007bd68703c9cb1bb6f6daaa4d9dd42c8182ffb05e07c13387b
@@ -1,3 +1,5 @@
1
+ require 'pry'
2
+
1
3
  module DittoCode
2
4
  class Parse
3
5
 
@@ -235,7 +237,8 @@ module DittoCode
235
237
 
236
238
  finals = line.scan(/[\s]+(end)[\s]*%>/).size
237
239
  else
238
- initializers = line.scan(/^[\s\t]*(case|unless|if|do|def|begin)[\s]+/).size # If, def, unless... of a start line
240
+ initializers = line.scan(/^[\s\t]*(case|unless|if|def|do)[\s]+/).size
241
+ initializers += line.scan(/^[\s\t]*(begin)[\s]*/).size # If, def, unless... of a start line
239
242
  initializers += line.scan(/[\s\t]+(case|do)[\s]+[|]+/).size # Case or do inside a line
240
243
  initializers += line.scan(/[\s\t]+(do)[\s]*$/).size # Finals do
241
244
  initializers += line.scan(/[\s\t]+(if|unless)[\s]+[@=\d\w\s]+(?:then){1}/).size # Only if|unless + then, this line disable error by: unless|if var
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ditto_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angel M Miguel