static_literal_parser 1.0.0 → 1.1.0

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/static_literal_parser.rb +2 -2
  3. metadata +8 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82b3e80ee21bee898310ea427ec7c8d17ac8cd6c4bdd695b01533c20b10ce6bb
4
- data.tar.gz: bceae076cc0417f41dd6d2e17c5f0a72c21c3f49d25bd7c3e4ea5ae045372d40
3
+ metadata.gz: 0cc0aad9cacc1025e4ce59cab95bc7f076a21248def58633f8667a5279dc0866
4
+ data.tar.gz: 1376efeb662024a50b6e315281915f80232948f059e23e9afbe85443c26724da
5
5
  SHA512:
6
- metadata.gz: d3a1ae56c150260c4b9d329a380e9dfd9575fd5807c5d6fe6c23977e7213ea0289a95b0d0c9fae60de1be88df88fdfa8eb8679a5431f689699e66830aef11453
7
- data.tar.gz: 31544354602f701aba7fa126112f71e1318b63625d2abb74dbf2c7ab03746bfb559c25a55d1371086c73697f2cd8b5763a019eb9334621cb712ae6ebde8c8c30
6
+ metadata.gz: 37147605518d3d1a32f5e5bb2e701c09b9e3118bc9d685b2958d48c421a12292b4c701e5c846dbde51945585ac156f00222da998d867d1df14357e189bbb35dd
7
+ data.tar.gz: 69a957bb156cb283e60f4089552af90a3f2ef052ad44a3d6e082c90655ce18cb68f0de75f36d725f6705d9e1a237a3654a68aeedc9a695cd3fa53307a6461007
@@ -9,8 +9,8 @@ module StaticLiteralParser
9
9
  case node.type
10
10
  when :SCOPE
11
11
  parse_(node.children[2], constants)
12
- when :LIST, :ZLIST
13
- node.children[..-2].map { parse_(_1, constants) }
12
+ when :LIST, :ZLIST, :ZARRAY, :ARRAY
13
+ node.children[0..-2].map {|x| parse_(x, constants) }
14
14
  when :HASH
15
15
  Hash[*parse_(node.children[0], constants)]
16
16
  when :LIT, :STR
metadata CHANGED
@@ -1,16 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: static_literal_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tatsuhiro Ujihisa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-10 00:00:00.000000000 Z
11
+ date: 2020-10-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: description
13
+ description: StaticLiteralParser is a RubyGems library that you can convert a String
14
+ to a Ruby object, parsing the string as an executable Ruby code, but without actually
15
+ executing it. This internally uses RubyVM::AbstractSyntaxTree to parse to construct
16
+ the object.
14
17
  email: ujihisa at gmail com
15
18
  executables: []
16
19
  extensions: []
@@ -36,8 +39,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
36
39
  - !ruby/object:Gem::Version
37
40
  version: '0'
38
41
  requirements: []
39
- rubygems_version: 3.2.0.rc.1
42
+ rubygems_version: 3.0.3
40
43
  signing_key:
41
44
  specification_version: 4
42
- summary: summary
45
+ summary: StaticLiteralParser.parse(str, constants)
43
46
  test_files: []