ruby2ruby 2.5.1 → 2.5.2
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 +6 -0
- data/lib/ruby2ruby.rb +7 -4
- data/test/test_ruby2ruby.rb +8 -7
- data.tar.gz.sig +0 -0
- metadata +11 -14
- 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: c64f2d5a6bbdc7e93781d52bed2848dff7a5981dcfa69dcbb6f7e6018041fe67
|
4
|
+
data.tar.gz: 9d3edc0270776e1e0c51ee0a7e5c4d7f91221e044cbf1f3dc423de7e1337a7cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5c7711e43250ccf0378474f7967e65bc18674bfcd79d1a2f5a682c7b6355a0038b586595e4f50c2c83cd724dbb521c5019dacf40caa4a77f9eacb2d37077111
|
7
|
+
data.tar.gz: 38cf570d752fca4d6884a14601cb1508d544e6476af73ac55bddfd80a577875298cb2106cfa1945bccd2124c47aecca2fc5ec908f3b06ba10e4b3982610f0d3e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
data/lib/ruby2ruby.rb
CHANGED
@@ -31,7 +31,7 @@ end
|
|
31
31
|
# Generate ruby code from a sexp.
|
32
32
|
|
33
33
|
class Ruby2Ruby < SexpProcessor
|
34
|
-
VERSION = "2.5.
|
34
|
+
VERSION = "2.5.2" # :nodoc:
|
35
35
|
|
36
36
|
# cutoff for one-liners
|
37
37
|
LINE_LENGTH = 78
|
@@ -916,11 +916,14 @@ class Ruby2Ruby < SexpProcessor
|
|
916
916
|
end
|
917
917
|
|
918
918
|
def process_op_asgn exp # :nodoc:
|
919
|
-
# [[:lvar, :x], [:call, nil, :z, [:lit, 1]], :y, :"||"]
|
920
|
-
|
921
919
|
case exp.length
|
922
920
|
when 4
|
923
|
-
|
921
|
+
_, lhs, op, rhs = exp
|
922
|
+
|
923
|
+
lhs = process lhs
|
924
|
+
rhs = process rhs
|
925
|
+
|
926
|
+
"#{lhs} #{op}= #{rhs}"
|
924
927
|
when 5
|
925
928
|
_, lhs, rhs, index, op = exp
|
926
929
|
|
data/test/test_ruby2ruby.rb
CHANGED
@@ -135,8 +135,6 @@ class TestRuby2Ruby < R2RTestCase
|
|
135
135
|
end
|
136
136
|
|
137
137
|
def test_hash_shorthand_invalid_key_type
|
138
|
-
do_not_check_sexp!
|
139
|
-
|
140
138
|
inn = s(:hash, s(:str, 'k'), nil)
|
141
139
|
out = '{ k: }'
|
142
140
|
assert_raises do
|
@@ -329,8 +327,6 @@ class TestRuby2Ruby < R2RTestCase
|
|
329
327
|
end
|
330
328
|
|
331
329
|
def test_dregx_slash
|
332
|
-
do_not_check_sexp!
|
333
|
-
|
334
330
|
inn = util_thingy(:dregx)
|
335
331
|
out = '/a"b#{(1 + 1)}c"d\/e/'
|
336
332
|
assert_parse inn, out, /a"b2c"d\/e/
|
@@ -349,8 +345,6 @@ class TestRuby2Ruby < R2RTestCase
|
|
349
345
|
end
|
350
346
|
|
351
347
|
def test_lit_regexp_slash
|
352
|
-
do_not_check_sexp! # dunno why on this one
|
353
|
-
|
354
348
|
assert_parse s(:lit, /blah\/blah/), '/blah\/blah/', /blah\/blah/
|
355
349
|
end
|
356
350
|
|
@@ -1067,6 +1061,13 @@ class TestRuby2Ruby < R2RTestCase
|
|
1067
1061
|
assert_parse inn, out
|
1068
1062
|
end
|
1069
1063
|
|
1064
|
+
def test_op_asgn_4
|
1065
|
+
inn = s(:op_asgn, s(:colon3, :X), :"&", s(:lit, 1))
|
1066
|
+
|
1067
|
+
out = "::X &= 1"
|
1068
|
+
assert_parse inn, out
|
1069
|
+
end
|
1070
|
+
|
1070
1071
|
def test_rescue_block
|
1071
1072
|
inn = s(:rescue,
|
1072
1073
|
s(:call, nil, :alpha),
|
@@ -1096,7 +1097,7 @@ class TestRuby2Ruby < R2RTestCase
|
|
1096
1097
|
end
|
1097
1098
|
|
1098
1099
|
def test_unless_vs_if_not
|
1099
|
-
do_not_check_sexp! #
|
1100
|
+
do_not_check_sexp! # dunno if it's possible to remove this one
|
1100
1101
|
|
1101
1102
|
rb1 = "a unless b"
|
1102
1103
|
rb2 = "a if (not b)"
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby2ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain:
|
11
10
|
- |
|
12
11
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
12
|
+
MIIDPjCCAiagAwIBAgIBCTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
|
14
13
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
14
|
+
GRYDY29tMB4XDTI1MDEwNjIzMjcwMVoXDTI2MDEwNjIzMjcwMVowRTETMBEGA1UE
|
16
15
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
16
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
17
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -22,14 +21,14 @@ cert_chain:
|
|
22
21
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
22
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
23
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBCwUAA4IB
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
AQAC0WQJcPOWPFwkojhzweilRVjTJ19UiLhiBTw3C1wJO3LVdBkWDmnnhAmKuX4D
|
25
|
+
r7vjQvESlABGIPdutI1Yl7mrHQzTkfLfXvNN6MT0nLChPyIYauT6SZZxubwJrUfA
|
26
|
+
7R0c2CJTIboZ0XaGpLsXqHEF1c29H7TV1QvVuqKAN2mCjh4N82QVn+ZKtys28AwT
|
27
|
+
6GfQX2fqLoi4KSc7xIzHKaNzqxeOICmJofk9w5VZ2rRN6yes8jvFYwz9HR41wdj8
|
28
|
+
bwfinv7Yp5fA6AysuZLhCykyfDuZVRrUp0Vb68YCKsLjJly/Theak+euNTxvHsB+
|
29
|
+
al9oSgPPHICMEX65qvLywitx
|
31
30
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
31
|
+
date: 2025-03-25 00:00:00.000000000 Z
|
33
32
|
dependencies:
|
34
33
|
- !ruby/object:Gem::Dependency
|
35
34
|
name: sexp_processor
|
@@ -120,7 +119,6 @@ licenses:
|
|
120
119
|
- MIT
|
121
120
|
metadata:
|
122
121
|
homepage_uri: https://github.com/seattlerb/ruby2ruby
|
123
|
-
post_install_message:
|
124
122
|
rdoc_options:
|
125
123
|
- "--main"
|
126
124
|
- README.rdoc
|
@@ -137,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
135
|
- !ruby/object:Gem::Version
|
138
136
|
version: '0'
|
139
137
|
requirements: []
|
140
|
-
rubygems_version: 3.
|
141
|
-
signing_key:
|
138
|
+
rubygems_version: 3.6.3
|
142
139
|
specification_version: 4
|
143
140
|
summary: ruby2ruby provides a means of generating pure ruby code easily from RubyParser
|
144
141
|
compatible Sexps
|
metadata.gz.sig
CHANGED
Binary file
|