persistent-dmnd 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitlab-ci.yml +54 -18
- data/.ruby-version +1 -1
- data/CODE_OF_CONDUCT.adoc +1 -1
- data/LICENSE +1 -1
- data/README.adoc +1 -1
- data/gems.rb +2 -2
- data/lib/persistent-dmnd.rb +3 -3
- data/lib/persistent-/360/237/222/216.rb +8 -8
- data/lib/persistent_dmnd/array.rb +8 -8
- data/lib/persistent_dmnd/concurrent_ruby_support.rb +5 -5
- data/lib/persistent_dmnd/dmndifier.rb +4 -4
- data/lib/persistent_dmnd/everywhere.rb +4 -5
- data/lib/persistent_dmnd/hash.rb +8 -8
- data/lib/persistent_dmnd/is_persistent.rb +2 -2
- data/lib/persistent_dmnd/jruby_9_2_set_workaround.rb +8 -10
- data/lib/persistent_dmnd/jruby_workaround.rb +11 -11
- data/lib/persistent_dmnd/ruby_1_9_and_2_0_support.rb +3 -3
- data/lib/persistent_dmnd/self_conversion.rb +3 -3
- data/lib/persistent_dmnd/set.rb +9 -9
- data/lib/persistent_dmnd/version.rb +3 -3
- data/persistent-dmnd.gemspec +28 -25
- data/sorbet/rbi/gems/concurrent-ruby.rbi +97 -24
- data/sorbet/rbi/gems/hamster.rbi +1 -0
- data/sorbet/rbi/hidden-definitions/errors.txt +1768 -689
- data/sorbet/rbi/hidden-definitions/hidden.rbi +2624 -1321
- data/sorbet/rbi/sorbet-typed/lib/rake/all/rake.rbi +645 -0
- data/sorbet/rbi/sorbet-typed/lib/rspec-core/all/rspec-core.rbi +1891 -0
- data/sorbet/rbi/todo.rbi +3 -3
- metadata +12 -28
- data/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +0 -8684
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/gem.rbi +0 -4222
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +0 -111
- data/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +0 -543
@@ -2,13 +2,13 @@
|
|
2
2
|
# typed: strong
|
3
3
|
|
4
4
|
# Persistent-💎: Ruby gem for easily creating immutable data structures
|
5
|
-
# Copyright (c) 2017 Ivo Anjo <ivo
|
5
|
+
# Copyright (c) 2017-2021 Ivo Anjo <ivo@ivoanjo.me>
|
6
6
|
#
|
7
7
|
# This file is part of Persistent-💎.
|
8
8
|
#
|
9
9
|
# MIT License
|
10
10
|
#
|
11
|
-
# Copyright (c) 2017 Ivo Anjo
|
11
|
+
# Copyright (c) 2017-2021 Ivo Anjo
|
12
12
|
#
|
13
13
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
14
14
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -31,5 +31,5 @@
|
|
31
31
|
# frozen_string_literal: true
|
32
32
|
|
33
33
|
module Persistent💎
|
34
|
-
VERSION =
|
34
|
+
VERSION = "2.0.3"
|
35
35
|
end
|
data/persistent-dmnd.gemspec
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
3
|
# Persistent-💎: Ruby gem for easily creating immutable data structures
|
4
|
-
# Copyright (c) 2017 Ivo Anjo <ivo
|
4
|
+
# Copyright (c) 2017-2021 Ivo Anjo <ivo@ivoanjo.me>
|
5
5
|
#
|
6
6
|
# This file is part of Persistent-💎.
|
7
7
|
#
|
8
8
|
# MIT License
|
9
9
|
#
|
10
|
-
# Copyright (c) 2017 Ivo Anjo
|
10
|
+
# Copyright (c) 2017-2021 Ivo Anjo
|
11
11
|
#
|
12
12
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
13
13
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -29,37 +29,40 @@
|
|
29
29
|
|
30
30
|
# frozen_string_literal: true
|
31
31
|
|
32
|
-
lib = File.expand_path(
|
32
|
+
lib = File.expand_path("../lib", __FILE__)
|
33
33
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
34
|
-
require
|
34
|
+
require "persistent_dmnd/version"
|
35
35
|
|
36
36
|
Gem::Specification.new do |spec|
|
37
|
-
spec.name
|
38
|
-
spec.version
|
39
|
-
spec.authors
|
40
|
-
spec.email
|
37
|
+
spec.name = "persistent-dmnd"
|
38
|
+
spec.version = Persistent💎::VERSION
|
39
|
+
spec.authors = "Ivo Anjo"
|
40
|
+
spec.email = "ivo@ivoanjo.me"
|
41
41
|
|
42
|
-
spec.summary
|
43
|
-
spec.description
|
44
|
-
spec.homepage
|
45
|
-
spec.license
|
42
|
+
spec.summary = "Persistent-💎: Because Immutable Data Is Forever"
|
43
|
+
spec.description = "A tiny ruby gem that gives you a beautiful short-hand syntax for creating immutable arrays, hashes and sets"
|
44
|
+
spec.homepage = "https://gitlab.com/ivoanjo/persistent-dmnd/"
|
45
|
+
spec.license = "MIT"
|
46
46
|
|
47
|
-
spec.files
|
47
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
48
48
|
f.match(%r{^(test|spec|features)/})
|
49
49
|
end
|
50
|
-
spec.require_paths = [
|
50
|
+
spec.require_paths = ["lib"]
|
51
51
|
|
52
|
-
spec.required_ruby_version =
|
52
|
+
spec.required_ruby_version = ">= 1.9.3"
|
53
53
|
|
54
|
-
spec.add_development_dependency
|
55
|
-
spec.add_development_dependency
|
56
|
-
spec.add_development_dependency
|
57
|
-
spec.add_development_dependency
|
58
|
-
spec.add_development_dependency
|
59
|
-
spec.add_development_dependency
|
60
|
-
spec.add_development_dependency
|
61
|
-
spec.add_development_dependency
|
62
|
-
|
54
|
+
spec.add_development_dependency "bundler", "~> 1.16" if RUBY_VERSION < "2.6"
|
55
|
+
spec.add_development_dependency "rake", "~> 12.2" # Note: Rake 12.2 is the last that supports Ruby 1.9
|
56
|
+
spec.add_development_dependency "rspec", "~> 3.8"
|
57
|
+
spec.add_development_dependency "concurrent-ruby", "~> 1.1"
|
58
|
+
spec.add_development_dependency "rufo", "~> 0.13" if RUBY_VERSION >= "2.6.0"
|
59
|
+
spec.add_development_dependency "pry" if RUBY_VERSION >= "2.0.0"
|
60
|
+
spec.add_development_dependency "pry-byebug" if RUBY_ENGINE == "ruby" && RUBY_VERSION >= "2.4"
|
61
|
+
spec.add_development_dependency "pry-debugger-jruby" if RUBY_ENGINE == "jruby" && !JRUBY_VERSION.start_with?("1.7.")
|
62
|
+
unless RUBY_ENGINE == "truffleruby"
|
63
|
+
spec.add_development_dependency "sorbet"
|
64
|
+
spec.add_development_dependency "spoom", "~> 1.1" if RUBY_VERSION >= "2.3.7"
|
65
|
+
end
|
63
66
|
|
64
|
-
spec.add_dependency
|
67
|
+
spec.add_dependency "hamster", "~> 3.0"
|
65
68
|
end
|
@@ -7,7 +7,8 @@
|
|
7
7
|
#
|
8
8
|
# https://github.com/sorbet/sorbet-typed/new/master?filename=lib/concurrent-ruby/all/concurrent-ruby.rbi
|
9
9
|
#
|
10
|
-
# concurrent-ruby-1.1.
|
10
|
+
# concurrent-ruby-1.1.9
|
11
|
+
|
11
12
|
module Concurrent
|
12
13
|
def abort_transaction; end
|
13
14
|
def atomically; end
|
@@ -44,6 +45,7 @@ module Concurrent
|
|
44
45
|
def self.processor_counter; end
|
45
46
|
def self.use_simple_logger(level = nil, output = nil); end
|
46
47
|
def self.use_stdlib_logger(level = nil, output = nil); end
|
48
|
+
extend Concurrent::Concern::Deprecation
|
47
49
|
extend Concurrent::Concern::Logging
|
48
50
|
extend Concurrent::Utility::EngineDetector
|
49
51
|
extend Concurrent::Utility::NativeExtensionLoader
|
@@ -139,6 +141,7 @@ module Concurrent::Synchronization::ConditionSignalling
|
|
139
141
|
end
|
140
142
|
class Concurrent::Synchronization::MutexLockableObject < Concurrent::Synchronization::AbstractLockableObject
|
141
143
|
def initialize(*defaults); end
|
144
|
+
def initialize_copy(other); end
|
142
145
|
def ns_wait(timeout = nil); end
|
143
146
|
def self.new(*args, &block); end
|
144
147
|
def synchronize; end
|
@@ -146,6 +149,7 @@ class Concurrent::Synchronization::MutexLockableObject < Concurrent::Synchroniza
|
|
146
149
|
end
|
147
150
|
class Concurrent::Synchronization::MonitorLockableObject < Concurrent::Synchronization::AbstractLockableObject
|
148
151
|
def initialize(*defaults); end
|
152
|
+
def initialize_copy(other); end
|
149
153
|
def ns_wait(timeout = nil); end
|
150
154
|
def self.new(*args, &block); end
|
151
155
|
def synchronize; end
|
@@ -153,6 +157,7 @@ class Concurrent::Synchronization::MonitorLockableObject < Concurrent::Synchroni
|
|
153
157
|
end
|
154
158
|
class Concurrent::Synchronization::RbxLockableObject < Concurrent::Synchronization::AbstractLockableObject
|
155
159
|
def initialize(*defaults); end
|
160
|
+
def initialize_copy(other); end
|
156
161
|
def ns_broadcast; end
|
157
162
|
def ns_signal; end
|
158
163
|
def ns_wait(timeout = nil); end
|
@@ -353,10 +358,12 @@ class Concurrent::AbstractThreadLocalVar
|
|
353
358
|
end
|
354
359
|
class Concurrent::RubyThreadLocalVar < Concurrent::AbstractThreadLocalVar
|
355
360
|
def allocate_storage; end
|
356
|
-
def
|
361
|
+
def get_default; end
|
357
362
|
def get_threadlocal_array(thread = nil); end
|
358
|
-
def
|
359
|
-
def self.
|
363
|
+
def next_index; end
|
364
|
+
def self.semi_sync(&block); end
|
365
|
+
def self.thread_finalizer(id); end
|
366
|
+
def self.thread_local_finalizer(index); end
|
360
367
|
def set_threadlocal_array(array, thread = nil); end
|
361
368
|
def value; end
|
362
369
|
def value=(value); end
|
@@ -438,6 +445,12 @@ module Concurrent::Concern::Logging
|
|
438
445
|
def log(level, progname, message = nil, &block); end
|
439
446
|
include Logger::Severity
|
440
447
|
end
|
448
|
+
module Concurrent::Concern::Deprecation
|
449
|
+
def deprecated(message, strip = nil); end
|
450
|
+
def deprecated_method(old_name, new_name); end
|
451
|
+
extend Concurrent::Concern::Deprecation
|
452
|
+
include Concurrent::Concern::Logging
|
453
|
+
end
|
441
454
|
module Concurrent::ExecutorService
|
442
455
|
def <<(task); end
|
443
456
|
def can_overflow?; end
|
@@ -445,28 +458,14 @@ module Concurrent::ExecutorService
|
|
445
458
|
def serialized?; end
|
446
459
|
include Concurrent::Concern::Logging
|
447
460
|
end
|
448
|
-
class Concurrent::AtExitImplementation < Concurrent::Synchronization::LockableObject
|
449
|
-
def add(handler_id = nil, &handler); end
|
450
|
-
def delete(handler_id); end
|
451
|
-
def enabled=(value); end
|
452
|
-
def enabled?; end
|
453
|
-
def handler?(handler_id); end
|
454
|
-
def handlers; end
|
455
|
-
def initialize(*args); end
|
456
|
-
def install; end
|
457
|
-
def ns_initialize(enabled = nil); end
|
458
|
-
def run; end
|
459
|
-
def runner; end
|
460
|
-
include Logger::Severity
|
461
|
-
end
|
462
461
|
class Concurrent::AbstractExecutorService < Concurrent::Synchronization::LockableObject
|
463
462
|
def auto_terminate=(value); end
|
464
463
|
def auto_terminate?; end
|
465
464
|
def fallback_policy; end
|
466
465
|
def handle_fallback(*args); end
|
467
|
-
def initialize(
|
466
|
+
def initialize(opts = nil, &block); end
|
468
467
|
def kill; end
|
469
|
-
def
|
468
|
+
def name; end
|
470
469
|
def ns_auto_terminate?; end
|
471
470
|
def ns_execute(*args, &task); end
|
472
471
|
def ns_kill_execution; end
|
@@ -475,8 +474,9 @@ class Concurrent::AbstractExecutorService < Concurrent::Synchronization::Lockabl
|
|
475
474
|
def shutdown; end
|
476
475
|
def shutdown?; end
|
477
476
|
def shuttingdown?; end
|
478
|
-
def
|
477
|
+
def to_s; end
|
479
478
|
def wait_for_termination(timeout = nil); end
|
479
|
+
include Concurrent::Concern::Deprecation
|
480
480
|
include Concurrent::ExecutorService
|
481
481
|
end
|
482
482
|
module Concurrent::SerialExecutorService
|
@@ -547,6 +547,7 @@ class Concurrent::RubyThreadPoolExecutor < Concurrent::RubyExecutorService
|
|
547
547
|
def remaining_capacity; end
|
548
548
|
def remove_busy_worker(worker); end
|
549
549
|
def scheduled_task_count; end
|
550
|
+
def synchronous; end
|
550
551
|
def worker_died(worker); end
|
551
552
|
def worker_not_old_enough(worker); end
|
552
553
|
def worker_task_completed; end
|
@@ -554,7 +555,7 @@ end
|
|
554
555
|
class Concurrent::RubyThreadPoolExecutor::Worker
|
555
556
|
def <<(message); end
|
556
557
|
def create_worker(queue, pool, idletime); end
|
557
|
-
def initialize(pool); end
|
558
|
+
def initialize(pool, id); end
|
558
559
|
def kill; end
|
559
560
|
def run_task(pool, task, args); end
|
560
561
|
def stop; end
|
@@ -579,7 +580,7 @@ end
|
|
579
580
|
class Concurrent::SimpleExecutorService < Concurrent::RubyExecutorService
|
580
581
|
def <<(task); end
|
581
582
|
def kill; end
|
582
|
-
def ns_initialize; end
|
583
|
+
def ns_initialize(*args); end
|
583
584
|
def post(*args, &task); end
|
584
585
|
def running?; end
|
585
586
|
def self.<<(task); end
|
@@ -847,12 +848,78 @@ end
|
|
847
848
|
module Concurrent::ThreadSafe
|
848
849
|
end
|
849
850
|
module Concurrent::ThreadSafe::Util
|
851
|
+
def self.make_synchronized_on_cruby(klass); end
|
852
|
+
def self.make_synchronized_on_rbx(klass); end
|
853
|
+
def self.make_synchronized_on_truffleruby(klass); end
|
850
854
|
end
|
851
855
|
class Concurrent::Array < Array
|
852
856
|
end
|
853
857
|
class Concurrent::Hash < Hash
|
854
858
|
end
|
855
|
-
class Concurrent::
|
859
|
+
class Concurrent::CRubySet < Set
|
860
|
+
def &(*args); end
|
861
|
+
def +(*args); end
|
862
|
+
def -(*args); end
|
863
|
+
def <(*args); end
|
864
|
+
def <<(*args); end
|
865
|
+
def <=(*args); end
|
866
|
+
def ==(*args); end
|
867
|
+
def ===(*args); end
|
868
|
+
def >(*args); end
|
869
|
+
def >=(*args); end
|
870
|
+
def ^(*args); end
|
871
|
+
def add(*args); end
|
872
|
+
def add?(*args); end
|
873
|
+
def classify(*args); end
|
874
|
+
def clear(*args); end
|
875
|
+
def collect!(*args); end
|
876
|
+
def compare_by_identity(*args); end
|
877
|
+
def compare_by_identity?(*args); end
|
878
|
+
def delete(*args); end
|
879
|
+
def delete?(*args); end
|
880
|
+
def delete_if(*args); end
|
881
|
+
def difference(*args); end
|
882
|
+
def disjoint?(*args); end
|
883
|
+
def divide(*args); end
|
884
|
+
def each(*args); end
|
885
|
+
def empty?(*args); end
|
886
|
+
def eql?(*args); end
|
887
|
+
def filter!(*args); end
|
888
|
+
def flatten!(*args); end
|
889
|
+
def flatten(*args); end
|
890
|
+
def flatten_merge(*args); end
|
891
|
+
def freeze(*args); end
|
892
|
+
def hash(*args); end
|
893
|
+
def include?(*args); end
|
894
|
+
def initialize(*args, &block); end
|
895
|
+
def initialize_copy(other); end
|
896
|
+
def inspect(*args); end
|
897
|
+
def intersect?(*args); end
|
898
|
+
def intersection(*args); end
|
899
|
+
def keep_if(*args); end
|
900
|
+
def length(*args); end
|
901
|
+
def map!(*args); end
|
902
|
+
def member?(*args); end
|
903
|
+
def merge(*args); end
|
904
|
+
def pretty_print(*args); end
|
905
|
+
def pretty_print_cycle(*args); end
|
906
|
+
def proper_subset?(*args); end
|
907
|
+
def proper_superset?(*args); end
|
908
|
+
def reject!(*args); end
|
909
|
+
def replace(*args); end
|
910
|
+
def reset(*args); end
|
911
|
+
def select!(*args); end
|
912
|
+
def size(*args); end
|
913
|
+
def subset?(*args); end
|
914
|
+
def subtract(*args); end
|
915
|
+
def superset?(*args); end
|
916
|
+
def to_a(*args); end
|
917
|
+
def to_s(*args); end
|
918
|
+
def to_set(*args); end
|
919
|
+
def union(*args); end
|
920
|
+
def |(*args); end
|
921
|
+
end
|
922
|
+
class Concurrent::Set < Concurrent::CRubySet
|
856
923
|
end
|
857
924
|
class Concurrent::Collection::NonConcurrentMapBackend
|
858
925
|
def [](key); end
|
@@ -895,6 +962,7 @@ class Concurrent::Collection::MriMapBackend < Concurrent::Collection::NonConcurr
|
|
895
962
|
end
|
896
963
|
class Concurrent::Map < Concurrent::Collection::MriMapBackend
|
897
964
|
def [](key); end
|
965
|
+
def []=(key, value); end
|
898
966
|
def each; end
|
899
967
|
def each_key; end
|
900
968
|
def each_pair; end
|
@@ -946,6 +1014,7 @@ class Concurrent::Async::AsyncDelegator < Concurrent::Synchronization::LockableO
|
|
946
1014
|
def initialize(delegate); end
|
947
1015
|
def method_missing(method, *args, &block); end
|
948
1016
|
def perform; end
|
1017
|
+
def reset_if_forked; end
|
949
1018
|
def respond_to_missing?(method, include_private = nil); end
|
950
1019
|
end
|
951
1020
|
class Concurrent::Async::AwaitDelegator
|
@@ -1025,6 +1094,7 @@ module Concurrent::Synchronization::AbstractStruct
|
|
1025
1094
|
def ns_each_pair; end
|
1026
1095
|
def ns_equality(other); end
|
1027
1096
|
def ns_get(member); end
|
1097
|
+
def ns_initialize_copy; end
|
1028
1098
|
def ns_inspect; end
|
1029
1099
|
def ns_merge(other, &block); end
|
1030
1100
|
def ns_select; end
|
@@ -1040,6 +1110,7 @@ module Concurrent::ImmutableStruct
|
|
1040
1110
|
def [](member); end
|
1041
1111
|
def each(&block); end
|
1042
1112
|
def each_pair(&block); end
|
1113
|
+
def initialize_copy(original); end
|
1043
1114
|
def inspect; end
|
1044
1115
|
def merge(other, &block); end
|
1045
1116
|
def select(&block); end
|
@@ -1058,6 +1129,7 @@ module Concurrent::MutableStruct
|
|
1058
1129
|
def []=(member, value); end
|
1059
1130
|
def each(&block); end
|
1060
1131
|
def each_pair(&block); end
|
1132
|
+
def initialize_copy(original); end
|
1061
1133
|
def inspect; end
|
1062
1134
|
def merge(other, &block); end
|
1063
1135
|
def select(&block); end
|
@@ -1128,6 +1200,7 @@ module Concurrent::SettableStruct
|
|
1128
1200
|
def []=(member, value); end
|
1129
1201
|
def each(&block); end
|
1130
1202
|
def each_pair(&block); end
|
1203
|
+
def initialize_copy(original); end
|
1131
1204
|
def inspect; end
|
1132
1205
|
def merge(other, &block); end
|
1133
1206
|
def select(&block); end
|