Linux ubuntu22 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64
nginx/1.18.0
: 128.199.27.159 | : 216.73.216.159
Cant Read [ /etc/named.conf ]
8.1.31
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
ruby /
gems /
3.0.0 /
gems /
rbs-1.0.4 /
lib /
rbs /
[ HOME SHELL ]
Name
Size
Permission
Action
ast
[ DIR ]
drwxr-xr-x
definition_builder
[ DIR ]
drwxr-xr-x
prototype
[ DIR ]
drwxr-xr-x
test
[ DIR ]
drwxr-xr-x
buffer.rb
890
B
-rw-r--r--
builtin_names.rb
1.56
KB
-rw-r--r--
cli.rb
21.91
KB
-rw-r--r--
constant.rb
461
B
-rw-r--r--
constant_table.rb
4.89
KB
-rw-r--r--
definition.rb
9.17
KB
-rw-r--r--
definition_builder.rb
29.39
KB
-rw-r--r--
environment.rb
13.72
KB
-rw-r--r--
environment_loader.rb
3.06
KB
-rw-r--r--
environment_walker.rb
4.11
KB
-rw-r--r--
errors.rb
8.66
KB
-rw-r--r--
factory.rb
301
B
-rw-r--r--
location.rb
2.31
KB
-rw-r--r--
method_type.rb
2.15
KB
-rw-r--r--
namespace.rb
2.12
KB
-rw-r--r--
parser.rb
95.03
KB
-rw-r--r--
parser.y
45.51
KB
-rw-r--r--
repository.rb
2.64
KB
-rw-r--r--
substitution.rb
1.23
KB
-rw-r--r--
test.rb
2.57
KB
-rw-r--r--
type_name.rb
1.61
KB
-rw-r--r--
type_name_resolver.rb
1.56
KB
-rw-r--r--
types.rb
25.19
KB
-rw-r--r--
validator.rb
1.76
KB
-rw-r--r--
variance_calculator.rb
3.89
KB
-rw-r--r--
vendorer.rb
2.03
KB
-rw-r--r--
version.rb
35
B
-rw-r--r--
writer.rb
8.12
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : variance_calculator.rb
module RBS class VarianceCalculator class Result attr_reader :result def initialize(variables:) @result = {} variables.each do |x| result[x] = :unused end end def covariant(x) case result[x] when :unused result[x] = :covariant when :contravariant result[x] = :invariant end end def contravariant(x) case result[x] when :unused result[x] = :contravariant when :covariant result[x] = :invariant end end def invariant(x) result[x] = :invariant end def each(&block) result.each(&block) end def include?(name) result.key?(name) end def compatible?(var, with_annotation:) variance = result[var] case when variance == :unused true when with_annotation == :invariant true when variance == with_annotation true else false end end end attr_reader :builder def initialize(builder:) @builder = builder end def env builder.env end def in_method_type(method_type:, variables:) result = Result.new(variables: variables) method_type.type.each_param do |param| type(param.type, result: result, context: :contravariant) end if block = method_type.block block.type.each_param do |param| type(param.type, result: result, context: :covariant) end type(block.type.return_type, result: result, context: :contravariant) end type(method_type.type.return_type, result: result, context: :covariant) result end def in_inherit(name:, args:, variables:) type = if name.class? Types::ClassInstance.new(name: name, args: args, location: nil) else Types::Interface.new(name: name, args: args, location: nil) end Result.new(variables: variables).tap do |result| type(type, result: result, context: :covariant) end end def type(type, result:, context:) case type when Types::Variable if result.include?(type.name) case context when :covariant result.covariant(type.name) when :contravariant result.contravariant(type.name) when :invariant result.invariant(type.name) end end when Types::ClassInstance, Types::Interface NoTypeFoundError.check!(type.name, env: env, location: type.location) type_params = case type when Types::ClassInstance env.class_decls[type.name].type_params when Types::Interface env.interface_decls[type.name].decl.type_params end type.args.each.with_index do |ty, i| var = type_params.params[i] case var&.variance when :invariant type(ty, result: result, context: :invariant) when :covariant type(ty, result: result, context: context) when :contravariant # @type var con: variance con = case context when :invariant :invariant when :covariant :contravariant when :contravariant :covariant else raise end type(ty, result: result, context: con) end end when Types::Tuple, Types::Record, Types::Union, Types::Intersection # Covariant types type.each_type do |ty| type(ty, result: result, context: context) end end end end end
Close