flay 2.14.3 → 2.14.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/History.rdoc +8 -1
- data/Rakefile +1 -1
- data/lib/flay.rb +2 -2
- data/test/test_flay.rb +21 -4
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: be4e30464c63609fc7e169633d341a4479794effbeab1cddae17ec61b7aa99c1
|
|
4
|
+
data.tar.gz: a5d0d7e99cba3df3c022c8524d215509f2fc7ccbec9c547332ef4a67d7473aaf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2686fd16226e533a3c6689025c14839ac7f446c12d572ab74799ad5db0a1c57fdf6d7674eb496e71ed3fbfcad3cc61b656db5bf7dde46fbfbb695babfcdbece5
|
|
7
|
+
data.tar.gz: 535c3aa7a9db9a4b98d1610e9c26dfea88a2afdc0782c030558e935f13f12442ec886df01c29afe723d70f44840a416b99f059947ee9e43a1a7f534e96c26293
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/History.rdoc
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
=== 2.4
|
|
1
|
+
=== 2.14.4 / 2026-04-14
|
|
2
|
+
|
|
3
|
+
* 2 bug fixes:
|
|
4
|
+
|
|
5
|
+
* Fix Sexp#[] to return empty sexp if indicies run off the end. (slbug)
|
|
6
|
+
* Loosened dependency on ruby2ruby to catch up and drop ruby_parser.
|
|
7
|
+
|
|
8
|
+
=== 2.14.3 / 2026-03-23
|
|
2
9
|
|
|
3
10
|
* 2 bug fixes:
|
|
4
11
|
|
data/Rakefile
CHANGED
data/lib/flay.rb
CHANGED
|
@@ -9,7 +9,7 @@ require "prism"
|
|
|
9
9
|
require "prism/translation/ruby_parser"
|
|
10
10
|
|
|
11
11
|
class Flay
|
|
12
|
-
VERSION = "2.14.
|
|
12
|
+
VERSION = "2.14.4" # :nodoc:
|
|
13
13
|
|
|
14
14
|
NotRubyParser = Class.new Prism::Translation::RubyParser # compatibility layer :nodoc:
|
|
15
15
|
|
|
@@ -585,7 +585,7 @@ class Sexp
|
|
|
585
585
|
|
|
586
586
|
def [] a # :nodoc:
|
|
587
587
|
return super if Integer === a
|
|
588
|
-
self.new._concat super
|
|
588
|
+
self.new._concat super || []
|
|
589
589
|
end
|
|
590
590
|
|
|
591
591
|
def + o # :nodoc:
|
data/test/test_flay.rb
CHANGED
|
@@ -229,18 +229,35 @@ class TestSexp < Minitest::Test
|
|
|
229
229
|
assert_equal exp.gsub(/\d+/, "N"), out.gsub(/\d+/, "N")
|
|
230
230
|
end
|
|
231
231
|
|
|
232
|
-
def
|
|
233
|
-
sexp = NotRubyParser.new.parse "def x(n); n + 1; end"
|
|
232
|
+
def test_sexp_idx
|
|
233
|
+
# sexp = NotRubyParser.new.parse "def x(n); n + 1; end"
|
|
234
|
+
sexp = s(:defn, :x, s(:args, :n),
|
|
235
|
+
s(:call, s(:lvar, :n), :+, s(:lit, 1)))
|
|
234
236
|
|
|
235
237
|
assert_equal :defn, sexp[0]
|
|
236
238
|
assert_equal s(:defn), sexp[0..0]
|
|
237
239
|
assert_equal s(:defn, :x), sexp[0..1]
|
|
238
240
|
end
|
|
239
241
|
|
|
242
|
+
def test_sexp_idx__off
|
|
243
|
+
# sexp = NotRubyParser.new.parse "->(something) { something.to_s }"
|
|
244
|
+
sexp = s(:iter,
|
|
245
|
+
s(:lambda),
|
|
246
|
+
s(:args, :something),
|
|
247
|
+
s(:call, s(:lvar, :something), :to_s))
|
|
248
|
+
|
|
249
|
+
# def arguments_element
|
|
250
|
+
# call_element.sexp_body(3) || []
|
|
251
|
+
call_element = sexp[1] # s(:lambda) = this is just wrong
|
|
252
|
+
|
|
253
|
+
assert_equal s(), call_element[3..-1]
|
|
254
|
+
assert_equal s(), call_element.sexp_body(3)
|
|
255
|
+
end
|
|
256
|
+
|
|
240
257
|
def test__fuzzy__split_at
|
|
241
258
|
# def x(n); n + 1; end
|
|
242
259
|
sexp = s(:defn, :x, s(:args, :n), s(:call, s(:lvar, :n), :+, s(:lit, 1)))
|
|
243
|
-
sexp = NotRubyParser.new.parse "def x(n); n + 1; end"
|
|
260
|
+
# sexp = NotRubyParser.new.parse "def x(n); n + 1; end"
|
|
244
261
|
|
|
245
262
|
a, b = sexp.split_at 2
|
|
246
263
|
|
|
@@ -251,7 +268,7 @@ class TestSexp < Minitest::Test
|
|
|
251
268
|
def test__fuzzy__split_code
|
|
252
269
|
# def x(n); n + 1; end
|
|
253
270
|
sexp = s(:defn, :x, s(:args, :n), s(:call, s(:lvar, :n), :+, s(:lit, 1)))
|
|
254
|
-
sexp = NotRubyParser.new.parse "def x(n); n + 1; end"
|
|
271
|
+
# sexp = NotRubyParser.new.parse "def x(n); n + 1; end"
|
|
255
272
|
|
|
256
273
|
a, b = sexp.split_code
|
|
257
274
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: flay
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.14.
|
|
4
|
+
version: 2.14.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Davis
|
|
@@ -106,14 +106,14 @@ dependencies:
|
|
|
106
106
|
requirements:
|
|
107
107
|
- - "~>"
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: 2.2
|
|
109
|
+
version: '2.2'
|
|
110
110
|
type: :development
|
|
111
111
|
prerelease: false
|
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
|
114
114
|
- - "~>"
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: 2.2
|
|
116
|
+
version: '2.2'
|
|
117
117
|
- !ruby/object:Gem::Dependency
|
|
118
118
|
name: rdoc
|
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
|
Binary file
|