prism_ext 0.3.2 → 0.3.3

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: d689ab464879e04de75f905ff5d3481e35848099ecb27d2bce625bec9eb02411
4
- data.tar.gz: 18efebda12545d89d5c848e6080d7488107d1f086093a4d4773495368841ab24
3
+ metadata.gz: 8be73f5b6b2e524e4b55574d755bf891006f356f375c3f38b642d9649b19fbe7
4
+ data.tar.gz: 8fb1fbd7f6600797a6f2597263ccec8c57cd8a550267271c32fd7fca3408aca2
5
5
  SHA512:
6
- metadata.gz: 9f60b313c96b813c21e3a5aee7fc60c083abb9ad368f6605680395687afd0ee7450348abe67b7ad85c9759a65f9910502159a867fe9024392cef33fd6776d126
7
- data.tar.gz: d02bf032c6ec2fe2f42a1417d3d3c3d98fd13713463e19d1423a4abd90df5b946b57689349b42a99c884d338aa71928db1964ba780b0f91337118234ed853335
6
+ metadata.gz: b72c45352632192e25b13c113f255f61beaa95fa4fd0c1c0f773cb6e8ac1359a6c513410f1d60701c209bb157e544e7ff5a836bacd69df6f2c8d5c440d914d7c
7
+ data.tar.gz: 8acfa50cdc0328557f58798257b478b983941db2202a4c82b8ee21db3752311d706521080bcfc970feb1e5b3fef4ec7b9d53a91227cae25f1e0e6b59f60d513b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.3.3 (2024-07-02)
4
+
5
+ * Fix heredoc `to_source`
6
+
3
7
  ## 0.3.2 (2024-04-18)
4
8
 
5
9
  * Remove `hash_element` and `hash_value` methods
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prism_ext (0.3.2)
4
+ prism_ext (0.3.3)
5
5
  prism
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  diff-lcs (1.5.0)
11
- prism (0.20.0)
11
+ prism (0.30.0)
12
12
  rake (13.1.0)
13
13
  rspec (3.12.0)
14
14
  rspec-core (~> 3.12.0)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PrismExt
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.3"
5
5
  end
data/lib/prism_ext.rb CHANGED
@@ -83,6 +83,12 @@ module Prism
83
83
  end
84
84
  end
85
85
 
86
- alias :to_source :slice
86
+ def to_source
87
+ if respond_to?(:opening_loc) && respond_to?(:closing_loc) && opening_loc && closing_loc
88
+ location.send(:source).source[opening_loc.start_offset...closing_loc.end_offset]
89
+ else
90
+ slice
91
+ end
92
+ end
87
93
  end
88
94
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prism_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-18 00:00:00.000000000 Z
11
+ date: 2024-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prism
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubygems_version: 3.5.3
65
+ rubygems_version: 3.5.14
66
66
  signing_key:
67
67
  specification_version: 4
68
68
  summary: extend ruby prism