ruby-next-core 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +15 -1
- data/bin/parse +11 -0
- data/lib/.rbnext/2.1/ruby-next/language.rb +11 -0
- data/lib/.rbnext/2.3/ruby-next/config.rb +2 -2
- data/lib/.rbnext/2.3/ruby-next/language/eval.rb +3 -3
- data/lib/.rbnext/2.3/ruby-next/language/rewriters/2.7/args_forward.rb +4 -4
- data/lib/.rbnext/2.3/ruby-next/utils.rb +13 -5
- data/lib/.rbnext/3.2/ruby-next/rubocop.rb +10 -1
- data/lib/ruby-next/config.rb +2 -2
- data/lib/ruby-next/language/eval.rb +3 -3
- data/lib/ruby-next/language/parser.rb +2 -2
- data/lib/ruby-next/language/rewriters/2.3/safe_navigation.rb +4 -4
- data/lib/ruby-next/language/rewriters/2.3/squiggly_heredoc.rb +1 -1
- data/lib/ruby-next/language/rewriters/2.4/dir.rb +1 -1
- data/lib/ruby-next/language/rewriters/2.5/rescue_within_block.rb +1 -1
- data/lib/ruby-next/language/rewriters/2.7/args_forward.rb +4 -4
- data/lib/ruby-next/language/rewriters/3.0/args_forward_leading.rb +1 -1
- data/lib/ruby-next/language/rewriters/3.0/endless_method.rb +2 -2
- data/lib/ruby-next/language/rewriters/3.0/find_pattern.rb +1 -1
- data/lib/ruby-next/language/rewriters/3.1/endless_method_command.rb +2 -2
- data/lib/ruby-next/language/rewriters/3.1/oneline_pattern_parensless.rb +1 -1
- data/lib/ruby-next/language/rewriters/3.1/pin_vars_pattern.rb +1 -1
- data/lib/ruby-next/language/rewriters/3.1/shorthand_hash.rb +1 -1
- data/lib/ruby-next/language/rewriters/{edge → 3.4}/it_param.rb +1 -1
- data/lib/ruby-next/language/rewriters/edge.rb +0 -12
- data/lib/ruby-next/language/rewriters/proposed/bind_vars_pattern.rb +1 -1
- data/lib/ruby-next/language.rb +11 -0
- data/lib/ruby-next/pry.rb +1 -2
- data/lib/ruby-next/rubocop.rb +10 -1
- data/lib/ruby-next/utils.rb +13 -5
- data/lib/ruby-next/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8ba05cac5681186f90c6a46731a78532ec69707c9b01bc1df15702ebae13e4d
|
4
|
+
data.tar.gz: cb58fc9d453a7be076a594902701b2011ea79496cab642437620519ccf3a0682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a75869db2f6fffade1e12d60aca0e1592cc669a0572cd114edae2c24e0d5bed22337063246a7edee5c2ce27a89c3aece048837aed463ff6781e5ea5e7052008
|
7
|
+
data.tar.gz: a28a71c3ad5e3a0e0bb08679dad23fe69a6a3ebdd14c66f4b800269c29eb97a74a837ab2c8479b824d9a47c81c1dd3916d1e9cefa76c3c88dd7a29170adc1b80
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -364,6 +364,20 @@ If the command fails we warn the end user.
|
|
364
364
|
|
365
365
|
This feature, _auto-transpiling_, is **disabled** by default (will likely be enabled in future versions). You can enable it by calling `RubyNext::Language.setup_gem_load_path(transpile: true)`.
|
366
366
|
|
367
|
+
### Dependency-less setup
|
368
|
+
|
369
|
+
If you want to avoid adding `ruby-next-core` to your gem's dependencies, you can tweak the `$LOAD_PATH` yourself. It's much easier to do if you go with a single transpiled version per source file (i.e., use `--single-version` or specify particular rewriters using the `--rewrite` option of the `ruby-next nextify` command). If so, you can drop the following snippet to your gem's entrypoint:
|
370
|
+
|
371
|
+
```ruby
|
372
|
+
# lib/my_gem.rb
|
373
|
+
$LOAD_PATH.unshift "#{__dir__}/.rbnext"
|
374
|
+
|
375
|
+
# Then go `require` statements
|
376
|
+
# ...
|
377
|
+
```
|
378
|
+
|
379
|
+
That's it! Keep in mind that in this cases there is no auto-transpiling support (so, you may want to keep the transpiled files in the repository to allow installing the gem from source).
|
380
|
+
|
367
381
|
## Runtime usage
|
368
382
|
|
369
383
|
It is also possible to transpile Ruby source code in run-time via Ruby Next.
|
@@ -552,7 +566,7 @@ require "ruby-next/language/runtime"
|
|
552
566
|
|
553
567
|
### Supported edge features
|
554
568
|
|
555
|
-
|
569
|
+
None yet.
|
556
570
|
|
557
571
|
### Supported proposed features
|
558
572
|
|
data/bin/parse
CHANGED
@@ -15,6 +15,17 @@ contents =
|
|
15
15
|
ARGV[0]
|
16
16
|
end
|
17
17
|
|
18
|
+
require "optparse"
|
19
|
+
|
20
|
+
OptionParser.new do |opts|
|
21
|
+
opts.banner = "Usage: parse filepath_or_code [options]"
|
22
|
+
|
23
|
+
opts.on("--next", "Use Ruby Next parser") do
|
24
|
+
require "parser/rubynext"
|
25
|
+
RubyNext::Language.parser_class = ::Parser::RubyNext
|
26
|
+
end
|
27
|
+
end.parse!
|
28
|
+
|
18
29
|
ast = RubyNext::Language.parse(contents)
|
19
30
|
puts ast
|
20
31
|
puts "\n // Parsed with #{RubyNext::Language.parser_class}"
|
@@ -285,6 +285,17 @@ module RubyNext
|
|
285
285
|
require "ruby-next/language/rewriters/2.6/endless_range"
|
286
286
|
rewriters << Rewriters::EndlessRange
|
287
287
|
|
288
|
+
require "ruby-next/language/rewriters/3.4/it_param"
|
289
|
+
|
290
|
+
# We must add `it` rewriter before nubmered params rewriter to allow it to transform the source code further
|
291
|
+
number_params = rewriters.index(Rewriters::NumberedParams)
|
292
|
+
|
293
|
+
if number_params
|
294
|
+
rewriters.insert(number_params, Rewriters::ItParam)
|
295
|
+
else
|
296
|
+
rewriters << Rewriters::ItParam
|
297
|
+
end
|
298
|
+
|
288
299
|
if RubyNext.edge_syntax?
|
289
300
|
require "ruby-next/language/rewriters/edge"
|
290
301
|
end
|
@@ -10,10 +10,10 @@ module RubyNext
|
|
10
10
|
# Defines last minor version for every major version
|
11
11
|
LAST_MINOR_VERSIONS = {
|
12
12
|
2 => 8, # 2.8 is required for backward compatibility: some gems already uses it
|
13
|
-
3 =>
|
13
|
+
3 => 5
|
14
14
|
}.freeze
|
15
15
|
|
16
|
-
LATEST_VERSION = [3,
|
16
|
+
LATEST_VERSION = [3, 5].freeze
|
17
17
|
|
18
18
|
# A virtual version number used for proposed features
|
19
19
|
NEXT_VERSION = "1995.next.0"
|
@@ -20,7 +20,7 @@ module RubyNext
|
|
20
20
|
module InstanceEval # :nodoc:
|
21
21
|
refine Object do
|
22
22
|
def instance_eval(*args, &block)
|
23
|
-
return super
|
23
|
+
return super if block
|
24
24
|
|
25
25
|
source = args.shift
|
26
26
|
new_source = ::RubyNext::Language::Runtime.transform(source, using: false)
|
@@ -33,7 +33,7 @@ module RubyNext
|
|
33
33
|
module ClassEval
|
34
34
|
refine Module do
|
35
35
|
def module_eval(*args, &block)
|
36
|
-
return super
|
36
|
+
return super if block
|
37
37
|
|
38
38
|
source = args.shift
|
39
39
|
new_source = ::RubyNext::Language::Runtime.transform(source, using: false)
|
@@ -43,7 +43,7 @@ module RubyNext
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def class_eval(*args, &block)
|
46
|
-
return super
|
46
|
+
return super if block
|
47
47
|
|
48
48
|
source = args.shift
|
49
49
|
new_source = ::RubyNext::Language::Runtime.transform(source, using: false)
|
@@ -5,7 +5,7 @@ module RubyNext
|
|
5
5
|
module Rewriters
|
6
6
|
class ArgsForward < Base
|
7
7
|
NAME = "args-forward"
|
8
|
-
SYNTAX_PROBE = "
|
8
|
+
SYNTAX_PROBE = "Module.new { def foo(...) super(...); end }"
|
9
9
|
MIN_SUPPORTED_VERSION = Gem::Version.new("2.7.0")
|
10
10
|
|
11
11
|
REST = :__rest__
|
@@ -17,7 +17,7 @@ module RubyNext
|
|
17
17
|
|
18
18
|
context.track! self
|
19
19
|
|
20
|
-
node = super
|
20
|
+
node = super
|
21
21
|
|
22
22
|
replace(farg.loc.expression, "*#{REST}, &#{BLOCK}")
|
23
23
|
|
@@ -33,14 +33,14 @@ module RubyNext
|
|
33
33
|
|
34
34
|
def on_send(node)
|
35
35
|
fargs = extract_fargs(node)
|
36
|
-
return super
|
36
|
+
return super unless fargs
|
37
37
|
|
38
38
|
process_fargs(node, fargs)
|
39
39
|
end
|
40
40
|
|
41
41
|
def on_super(node)
|
42
42
|
fargs = extract_fargs(node)
|
43
|
-
return super
|
43
|
+
return super unless fargs
|
44
44
|
|
45
45
|
process_fargs(node, fargs)
|
46
46
|
end
|
@@ -26,11 +26,19 @@ module RubyNext
|
|
26
26
|
end
|
27
27
|
using(Module.new do
|
28
28
|
refine RubyNext::Utils::A do
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
29
|
+
if RUBY_VERSION >= "3.3.0"
|
30
|
+
import_methods(Module.new do
|
31
|
+
def i_am_refinement
|
32
|
+
"yes, you are!"
|
33
|
+
end
|
34
|
+
end)
|
35
|
+
else
|
36
|
+
include(Module.new do
|
37
|
+
def i_am_refinement
|
38
|
+
"yes, you are!"
|
39
|
+
end
|
40
|
+
end)
|
41
|
+
end
|
34
42
|
end
|
35
43
|
end)
|
36
44
|
RubyNext::Utils::B.new.i_am_refinement
|
@@ -36,6 +36,15 @@ end
|
|
36
36
|
module RuboCop
|
37
37
|
class ProcessedSource
|
38
38
|
module ParserClassExt
|
39
|
+
require "ruby-next/language"
|
40
|
+
TEXT_REWRITERS = RubyNext::Language.rewriters.select(&:text?)
|
41
|
+
|
42
|
+
def parse(src, *args)
|
43
|
+
# We must apply text rewriters before parsing
|
44
|
+
src = RubyNext::Language.send(:text_rewrite, src, rewriters: TEXT_REWRITERS, using: false, context: RubyNext::Language::TransformContext.new(path: path))
|
45
|
+
super
|
46
|
+
end
|
47
|
+
|
39
48
|
def parser_class(version, *__rest__)
|
40
49
|
return super unless version == RUBY_NEXT_VERSION
|
41
50
|
|
@@ -166,7 +175,7 @@ module RuboCop
|
|
166
175
|
def on_pair(node)
|
167
176
|
return if node.children[0].loc.last_column == node.children[1].loc.last_column
|
168
177
|
|
169
|
-
super
|
178
|
+
super
|
170
179
|
end
|
171
180
|
end)
|
172
181
|
end
|
data/lib/ruby-next/config.rb
CHANGED
@@ -10,10 +10,10 @@ module RubyNext
|
|
10
10
|
# Defines last minor version for every major version
|
11
11
|
LAST_MINOR_VERSIONS = {
|
12
12
|
2 => 8, # 2.8 is required for backward compatibility: some gems already uses it
|
13
|
-
3 =>
|
13
|
+
3 => 5
|
14
14
|
}.freeze
|
15
15
|
|
16
|
-
LATEST_VERSION = [3,
|
16
|
+
LATEST_VERSION = [3, 5].freeze
|
17
17
|
|
18
18
|
# A virtual version number used for proposed features
|
19
19
|
NEXT_VERSION = "1995.next.0"
|
@@ -20,7 +20,7 @@ module RubyNext
|
|
20
20
|
module InstanceEval # :nodoc:
|
21
21
|
refine Object do
|
22
22
|
def instance_eval(*args, &block)
|
23
|
-
return super
|
23
|
+
return super if block
|
24
24
|
|
25
25
|
source = args.shift
|
26
26
|
new_source = ::RubyNext::Language::Runtime.transform(source, using: false)
|
@@ -33,7 +33,7 @@ module RubyNext
|
|
33
33
|
module ClassEval
|
34
34
|
refine Module do
|
35
35
|
def module_eval(*args, &block)
|
36
|
-
return super
|
36
|
+
return super if block
|
37
37
|
|
38
38
|
source = args.shift
|
39
39
|
new_source = ::RubyNext::Language::Runtime.transform(source, using: false)
|
@@ -43,7 +43,7 @@ module RubyNext
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def class_eval(*args, &block)
|
46
|
-
return super
|
46
|
+
return super if block
|
47
47
|
|
48
48
|
source = args.shift
|
49
49
|
new_source = ::RubyNext::Language::Runtime.transform(source, using: false)
|
@@ -4,7 +4,7 @@ begin
|
|
4
4
|
require "prism"
|
5
5
|
require "prism/translation/parser"
|
6
6
|
rescue LoadError
|
7
|
-
require "parser/
|
7
|
+
require "parser/ruby34"
|
8
8
|
end
|
9
9
|
|
10
10
|
module RubyNext
|
@@ -83,7 +83,7 @@ module RubyNext
|
|
83
83
|
Language.const_set(:PrismParser, clazz)
|
84
84
|
end
|
85
85
|
else
|
86
|
-
::Parser::
|
86
|
+
::Parser::Ruby34
|
87
87
|
end
|
88
88
|
end
|
89
89
|
end
|
@@ -11,7 +11,7 @@ module RubyNext
|
|
11
11
|
SAFE_LVAR = :__safe_lvar__
|
12
12
|
|
13
13
|
def on_csend(node)
|
14
|
-
node = super
|
14
|
+
node = super # rubocop:disable Lint/ShadowedArgument
|
15
15
|
|
16
16
|
context.track! self
|
17
17
|
|
@@ -32,7 +32,7 @@ module RubyNext
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def on_block(node)
|
35
|
-
return super
|
35
|
+
return super unless node.children[0].type == :csend
|
36
36
|
|
37
37
|
context.track!(self)
|
38
38
|
|
@@ -40,7 +40,7 @@ module RubyNext
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def on_numblock(node)
|
43
|
-
return super
|
43
|
+
return super unless node.children[0].type == :csend
|
44
44
|
|
45
45
|
context.track!(self)
|
46
46
|
|
@@ -48,7 +48,7 @@ module RubyNext
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def on_op_asgn(node)
|
51
|
-
return super
|
51
|
+
return super unless node.children[0].type == :csend
|
52
52
|
|
53
53
|
context.track!(self)
|
54
54
|
|
@@ -9,7 +9,7 @@ module RubyNext
|
|
9
9
|
MIN_SUPPORTED_VERSION = Gem::Version.new("2.3.0")
|
10
10
|
|
11
11
|
def on_str(node)
|
12
|
-
node = super
|
12
|
+
node = super if defined?(super_method)
|
13
13
|
return node unless node.loc.respond_to?(:heredoc_body) && node.loc.expression.source.include?("<<~")
|
14
14
|
|
15
15
|
context.track! self
|
@@ -5,7 +5,7 @@ module RubyNext
|
|
5
5
|
module Rewriters
|
6
6
|
class ArgsForward < Base
|
7
7
|
NAME = "args-forward"
|
8
|
-
SYNTAX_PROBE = "
|
8
|
+
SYNTAX_PROBE = "Module.new { def foo(...) super(...); end }"
|
9
9
|
MIN_SUPPORTED_VERSION = Gem::Version.new("2.7.0")
|
10
10
|
|
11
11
|
REST = :__rest__
|
@@ -17,7 +17,7 @@ module RubyNext
|
|
17
17
|
|
18
18
|
context.track! self
|
19
19
|
|
20
|
-
node = super
|
20
|
+
node = super
|
21
21
|
|
22
22
|
replace(farg.loc.expression, "*#{REST}, &#{BLOCK}")
|
23
23
|
|
@@ -33,14 +33,14 @@ module RubyNext
|
|
33
33
|
|
34
34
|
def on_send(node)
|
35
35
|
fargs = extract_fargs(node)
|
36
|
-
return super
|
36
|
+
return super unless fargs
|
37
37
|
|
38
38
|
process_fargs(node, fargs)
|
39
39
|
end
|
40
40
|
|
41
41
|
def on_super(node)
|
42
42
|
fargs = extract_fargs(node)
|
43
|
-
return super
|
43
|
+
return super unless fargs
|
44
44
|
|
45
45
|
process_fargs(node, fargs)
|
46
46
|
end
|
@@ -5,7 +5,7 @@ module RubyNext
|
|
5
5
|
module Rewriters
|
6
6
|
class ArgsForwardLeading < ArgsForward
|
7
7
|
NAME = "args-forward-leading"
|
8
|
-
SYNTAX_PROBE = "
|
8
|
+
SYNTAX_PROBE = "Module.new { def foo(...) super(1, ...); end }"
|
9
9
|
MIN_SUPPORTED_VERSION = Gem::Version.new("3.0.0")
|
10
10
|
|
11
11
|
attr_reader :leading_farg
|
@@ -11,7 +11,7 @@ module RubyNext
|
|
11
11
|
def on_def(node)
|
12
12
|
return process_def(node) if endless?(node)
|
13
13
|
|
14
|
-
super
|
14
|
+
super
|
15
15
|
end
|
16
16
|
|
17
17
|
def process_def(node)
|
@@ -34,7 +34,7 @@ module RubyNext
|
|
34
34
|
|
35
35
|
def on_defs(node)
|
36
36
|
return process_defs(node) if endless?(node)
|
37
|
-
super
|
37
|
+
super
|
38
38
|
end
|
39
39
|
|
40
40
|
def process_defs(node)
|
@@ -9,7 +9,7 @@ module RubyNext
|
|
9
9
|
MIN_SUPPORTED_VERSION = Gem::Version.new("3.1.0")
|
10
10
|
|
11
11
|
def on_pair(node)
|
12
|
-
return super
|
12
|
+
return super unless (node.children[0].loc.last_column == node.children[1].loc.last_column) &&
|
13
13
|
(node.children[1].loc.first_line == node.children[1].loc.last_line)
|
14
14
|
|
15
15
|
context.track! self
|
@@ -53,7 +53,7 @@ module RubyNext
|
|
53
53
|
node.is_a?(Parser::AST::Node) && (
|
54
54
|
node.type == :send && node.children[0].nil? && node.children[1] == :it && node.children[2].nil?
|
55
55
|
) || ( # Prism version
|
56
|
-
node.type == :lvar && node.children[0] == :
|
56
|
+
node.type == :lvar && node.children[0] == :it
|
57
57
|
)
|
58
58
|
end
|
59
59
|
end
|
@@ -1,15 +1,3 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Load edge Ruby features
|
4
|
-
|
5
|
-
require "ruby-next/language/rewriters/edge/it_param"
|
6
|
-
|
7
|
-
# We must add this rewriter before nubmered params rewriter to allow it to transform the source code further
|
8
|
-
|
9
|
-
number_params = RubyNext::Language.rewriters.index(RubyNext::Language::Rewriters::NumberedParams)
|
10
|
-
|
11
|
-
if number_params
|
12
|
-
RubyNext::Language.rewriters.insert(number_params, RubyNext::Language::Rewriters::ItParam)
|
13
|
-
else
|
14
|
-
RubyNext::Language.rewriters << RubyNext::Language::Rewriters::ItParam
|
15
|
-
end
|
data/lib/ruby-next/language.rb
CHANGED
@@ -285,6 +285,17 @@ module RubyNext
|
|
285
285
|
require "ruby-next/language/rewriters/2.6/endless_range"
|
286
286
|
rewriters << Rewriters::EndlessRange
|
287
287
|
|
288
|
+
require "ruby-next/language/rewriters/3.4/it_param"
|
289
|
+
|
290
|
+
# We must add `it` rewriter before nubmered params rewriter to allow it to transform the source code further
|
291
|
+
number_params = rewriters.index(Rewriters::NumberedParams)
|
292
|
+
|
293
|
+
if number_params
|
294
|
+
rewriters.insert(number_params, Rewriters::ItParam)
|
295
|
+
else
|
296
|
+
rewriters << Rewriters::ItParam
|
297
|
+
end
|
298
|
+
|
288
299
|
if RubyNext.edge_syntax?
|
289
300
|
require "ruby-next/language/rewriters/edge"
|
290
301
|
end
|
data/lib/ruby-next/pry.rb
CHANGED
@@ -49,7 +49,6 @@ Pry.prepend(Module.new do
|
|
49
49
|
obj.instance_eval do
|
50
50
|
def eval(code, *args)
|
51
51
|
new_code = ::RubyNext::Language::Runtime.transform(code, using: false)
|
52
|
-
|
53
52
|
super(new_code, *args)
|
54
53
|
end
|
55
54
|
|
@@ -70,7 +69,7 @@ Pry::Code.singleton_class.prepend(Module.new do
|
|
70
69
|
true
|
71
70
|
rescue Parser::SyntaxError => ex
|
72
71
|
case ex.message
|
73
|
-
when /unexpected token \$end/
|
72
|
+
when /(unexpected token \$end|unexpected end-of-input)/
|
74
73
|
false
|
75
74
|
else
|
76
75
|
true
|
data/lib/ruby-next/rubocop.rb
CHANGED
@@ -36,6 +36,15 @@ end
|
|
36
36
|
module RuboCop
|
37
37
|
class ProcessedSource
|
38
38
|
module ParserClassExt
|
39
|
+
require "ruby-next/language"
|
40
|
+
TEXT_REWRITERS = RubyNext::Language.rewriters.select(&:text?)
|
41
|
+
|
42
|
+
def parse(src, *args)
|
43
|
+
# We must apply text rewriters before parsing
|
44
|
+
src = RubyNext::Language.send(:text_rewrite, src, rewriters: TEXT_REWRITERS, using: false, context: RubyNext::Language::TransformContext.new(path: path))
|
45
|
+
super
|
46
|
+
end
|
47
|
+
|
39
48
|
def parser_class(version, *)
|
40
49
|
return super unless version == RUBY_NEXT_VERSION
|
41
50
|
|
@@ -166,7 +175,7 @@ module RuboCop
|
|
166
175
|
def on_pair(node)
|
167
176
|
return if node.children[0].loc.last_column == node.children[1].loc.last_column
|
168
177
|
|
169
|
-
super
|
178
|
+
super
|
170
179
|
end
|
171
180
|
end)
|
172
181
|
end
|
data/lib/ruby-next/utils.rb
CHANGED
@@ -27,11 +27,19 @@ module RubyNext
|
|
27
27
|
|
28
28
|
using(Module.new do
|
29
29
|
refine RubyNext::Utils::A do
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
if RUBY_VERSION >= "3.3.0"
|
31
|
+
import_methods(Module.new do
|
32
|
+
def i_am_refinement
|
33
|
+
"yes, you are!"
|
34
|
+
end
|
35
|
+
end)
|
36
|
+
else
|
37
|
+
include(Module.new do
|
38
|
+
def i_am_refinement
|
39
|
+
"yes, you are!"
|
40
|
+
end
|
41
|
+
end)
|
42
|
+
end
|
35
43
|
end
|
36
44
|
end)
|
37
45
|
|
data/lib/ruby-next/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-next-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: require-hooks
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.
|
33
|
+
version: 3.4.0.2
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.
|
40
|
+
version: 3.4.0.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: unparser
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,10 +178,10 @@ files:
|
|
178
178
|
- lib/ruby-next/language/rewriters/3.1/refinement_import_methods.rb
|
179
179
|
- lib/ruby-next/language/rewriters/3.1/shorthand_hash.rb
|
180
180
|
- lib/ruby-next/language/rewriters/3.2/anonymous_restargs.rb
|
181
|
+
- lib/ruby-next/language/rewriters/3.4/it_param.rb
|
181
182
|
- lib/ruby-next/language/rewriters/abstract.rb
|
182
183
|
- lib/ruby-next/language/rewriters/base.rb
|
183
184
|
- lib/ruby-next/language/rewriters/edge.rb
|
184
|
-
- lib/ruby-next/language/rewriters/edge/it_param.rb
|
185
185
|
- lib/ruby-next/language/rewriters/proposed.rb
|
186
186
|
- lib/ruby-next/language/rewriters/proposed/bind_vars_pattern.rb
|
187
187
|
- lib/ruby-next/language/rewriters/proposed/method_reference.rb
|