rbs 0.9.1 → 0.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '094182e5d2602ec5ba9244068f67f854dfd5aa9c804fe48f2e943934da3e806b'
4
- data.tar.gz: bbd2a02e2c79a092f3e3555337aebdb557301fd2dd712bc46bcfaaa3ae4f3ed5
3
+ metadata.gz: 29535fcd236ba4d658d2c975b5084aa58b125203c4aaa1ec4704881b92ed89c7
4
+ data.tar.gz: 71e165ea5cb1ccbf1b48e9683201f6058dc7c95c7a7619865bf26af2cb6485ad
5
5
  SHA512:
6
- metadata.gz: 8de689c6af71a94ef511cd5efc9b64d1277f99256e759ec58ad4185505831e3ca041a8555f454ea6700713a4f03a88caeed2104009b8915b9acf5c8b4e5ba53b
7
- data.tar.gz: dec9ab30d0d1261897103b71c7203d3857c2cd4150ef145f3b8f3d005b7ba3f9daa947033a1db37c7f7aaf7530725f9129707d29def747fe9334a75acbcc9a16
6
+ metadata.gz: 236e10d6a7372a1c9b3c07a343a4620048c3f269f750e74f82539fd819f690475deb52090eec0cf38bc338344d240586f44941339bea7759066f68f90c5a3bdb
7
+ data.tar.gz: 8ef6ef34e9b39c310f70138135589611c31c8840fdea06eaa606b5004fc5d6634882ddd169b030dd4140645ad9d18c7a4a796a8bba88cd917ea1a69b461efdd1
@@ -2,6 +2,14 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.10.0 (2020-08-10)
6
+
7
+ * Signature update for `Zlib`
8
+ * Make "no type checker installed" message a debug print [#363](https://github.com/ruby/rbs/pull/363)
9
+ * Print `...` for overloading method definitions [#362](https://github.com/ruby/rbs/pull/362)
10
+ * Allow missing method implementation in Ruby code [#359](https://github.com/ruby/rbs/pull/359)
11
+ * Runtime testing improvements [#356](https://github.com/ruby/rbs/pull/356)
12
+
5
13
  ## 0.9.1 (2020-08-04)
6
14
 
7
15
  * Ensure using Module#name [#354](https://github.com/ruby/rbs/pull/354)
@@ -50,11 +50,13 @@ module RBS
50
50
  attr_reader :super_method
51
51
  attr_reader :defs
52
52
  attr_reader :accessibility
53
+ attr_reader :extra_annotations
53
54
 
54
- def initialize(super_method:, defs:, accessibility:)
55
+ def initialize(super_method:, defs:, accessibility:, annotations: [])
55
56
  @super_method = super_method
56
57
  @defs = defs
57
58
  @accessibility = accessibility
59
+ @extra_annotations = annotations
58
60
  end
59
61
 
60
62
  def defined_in
@@ -74,7 +76,7 @@ module RBS
74
76
  end
75
77
 
76
78
  def annotations
77
- @annotations ||= defs.flat_map(&:annotations)
79
+ @annotations ||= @extra_annotations + defs.flat_map(&:annotations)
78
80
  end
79
81
 
80
82
  # @deprecated
@@ -934,7 +934,8 @@ module RBS
934
934
  implemented_in: nil
935
935
  )
936
936
  end,
937
- accessibility: :public
937
+ accessibility: :public,
938
+ annotations: [AST::Annotation.new(location: nil, string: "rbs:test:target")]
938
939
  )
939
940
  end
940
941
  end
@@ -7,6 +7,7 @@ module RBS
7
7
  OPERATORS = {
8
8
  :== => "eqeq",
9
9
  :=== => "eqeqeq",
10
+ :!= => "noteq",
10
11
  :+ => "plus",
11
12
  :- => "minus",
12
13
  :* => "star",
@@ -58,11 +58,9 @@ TracePoint.trace :end do |tp|
58
58
 
59
59
  if class_name
60
60
  if filter.any? {|f| match(to_absolute_typename(f).to_s, class_name.to_s) } && skips.none? {|f| match(f, class_name.to_s) }
61
- unless tester.targets.include?(tp.self)
62
- if env.class_decls.key?(class_name)
63
- logger.info "Setting up hooks for #{class_name}"
64
- tester.install!(tp.self, sample_size: sample_size)
65
- end
61
+ if env.class_decls.key?(class_name)
62
+ logger.info "Setting up hooks for #{class_name}"
63
+ tester.install!(tp.self, sample_size: sample_size)
66
64
  end
67
65
  end
68
66
  end
@@ -71,7 +69,7 @@ end
71
69
  at_exit do
72
70
  if $!.nil? || $!.is_a?(SystemExit) && $!.success?
73
71
  if tester.targets.empty?
74
- logger.warn "No type checker was installed!"
72
+ logger.debug { "No type checker was installed!" }
75
73
  end
76
74
  end
77
75
  end
@@ -3,10 +3,14 @@ module RBS
3
3
  class Tester
4
4
  attr_reader :env
5
5
  attr_reader :targets
6
+ attr_reader :instance_testers
7
+ attr_reader :singleton_testers
6
8
 
7
9
  def initialize(env:)
8
10
  @env = env
9
11
  @targets = []
12
+ @instance_testers = {}
13
+ @singleton_testers = {}
10
14
  end
11
15
 
12
16
  def factory
@@ -17,6 +21,22 @@ module RBS
17
21
  @builder ||= DefinitionBuilder.new(env: env)
18
22
  end
19
23
 
24
+ def skip_method?(type_name, method)
25
+ if method.implemented_in == type_name
26
+ if method.annotations.any? {|a| a.string == "rbs:test:skip" }
27
+ :skip
28
+ else
29
+ false
30
+ end
31
+ else
32
+ if method.annotations.any? {|a| a.string == "rbs:test:target" }
33
+ false
34
+ else
35
+ :implemented_in
36
+ end
37
+ end
38
+ end
39
+
20
40
  def install!(klass, sample_size:)
21
41
  RBS.logger.info { "Installing runtime type checker in #{klass}..." }
22
42
 
@@ -24,24 +44,46 @@ module RBS
24
44
 
25
45
  builder.build_instance(type_name).tap do |definition|
26
46
  instance_key = new_key(type_name, "InstanceChecker")
27
- Observer.register(instance_key, MethodCallTester.new(klass, builder, definition, kind: :instance, sample_size: sample_size))
47
+ tester, set = instance_testers[klass] ||= [
48
+ MethodCallTester.new(klass, builder, definition, kind: :instance, sample_size: sample_size),
49
+ Set[]
50
+ ]
51
+ Observer.register(instance_key, tester)
28
52
 
29
53
  definition.methods.each do |name, method|
30
- if method.implemented_in == type_name
31
- RBS.logger.info { "Setting up method hook in ##{name}..." }
32
- Hook.hook_instance_method klass, name, key: instance_key
54
+ if reason = skip_method?(type_name, method)
55
+ unless reason == :implemented_in
56
+ RBS.logger.info { "Skipping ##{name} because of `#{reason}`..." }
57
+ end
58
+ else
59
+ if klass.instance_methods(false).include?(name) && !set.include?(name)
60
+ RBS.logger.info { "Setting up method hook in ##{name}..." }
61
+ Hook.hook_instance_method klass, name, key: instance_key
62
+ set << name
63
+ end
33
64
  end
34
65
  end
35
66
  end
36
67
 
37
68
  builder.build_singleton(type_name).tap do |definition|
38
69
  singleton_key = new_key(type_name, "SingletonChecker")
39
- Observer.register(singleton_key, MethodCallTester.new(klass.singleton_class, builder, definition, kind: :singleton, sample_size: sample_size))
70
+ tester, set = singleton_testers[klass] ||= [
71
+ MethodCallTester.new(klass.singleton_class, builder, definition, kind: :singleton, sample_size: sample_size),
72
+ Set[]
73
+ ]
74
+ Observer.register(singleton_key, tester)
40
75
 
41
76
  definition.methods.each do |name, method|
42
- if method.implemented_in == type_name || name == :new
43
- RBS.logger.info { "Setting up method hook in .#{name}..." }
44
- Hook.hook_singleton_method klass, name, key: singleton_key
77
+ if reason = skip_method?(type_name, method)
78
+ unless reason == :implemented_in
79
+ RBS.logger.info { "Skipping .#{name} because of `#{reason}`..." }
80
+ end
81
+ else
82
+ if klass.methods(false).include?(name) && !set.include?(name)
83
+ RBS.logger.info { "Setting up method hook in .#{name}..." }
84
+ Hook.hook_singleton_method klass, name, key: singleton_key
85
+ set << name
86
+ end
45
87
  end
46
88
  end
47
89
  end
@@ -5,12 +5,15 @@ module RBS
5
5
  attr_reader :builder
6
6
  attr_reader :sample_size
7
7
 
8
+ attr_reader :const_cache
9
+
8
10
  DEFAULT_SAMPLE_SIZE = 100
9
11
 
10
12
  def initialize(self_class:, builder:, sample_size:)
11
13
  @self_class = self_class
12
14
  @builder = builder
13
15
  @sample_size = sample_size
16
+ @const_cache = {}
14
17
  end
15
18
 
16
19
  def overloaded_call(method, method_name, call, errors:)
@@ -179,8 +182,25 @@ module RBS
179
182
  end
180
183
  end
181
184
 
182
- def sample(array)
183
- sample_size && (array.size > sample_size) ? array.sample(sample_size) : array
185
+ def each_sample(array, &block)
186
+ if block
187
+ if sample_size && array.size > sample_size
188
+ if sample_size > 0
189
+ size = array.size
190
+ sample_size.times do
191
+ yield array[rand(size)]
192
+ end
193
+ end
194
+ else
195
+ array.each(&block)
196
+ end
197
+ else
198
+ enum_for :each_sample, array
199
+ end
200
+ end
201
+
202
+ def get_class(type_name)
203
+ const_cache[type_name] ||= Object.const_get(type_name.to_s)
184
204
  end
185
205
 
186
206
  def value(val, type)
@@ -204,17 +224,14 @@ module RBS
204
224
  when Types::Bases::Instance
205
225
  Test.call(val, IS_AP, self_class)
206
226
  when Types::ClassInstance
207
- klass = Object.const_get(type.name.to_s)
227
+ klass = get_class(type.name)
208
228
  case
209
229
  when klass == ::Array
210
- Test.call(val, IS_AP, klass) && sample(val).yield_self do |val|
211
- val.all? {|v| value(v, type.args[0]) }
212
- end
230
+ Test.call(val, IS_AP, klass) && each_sample(val).all? {|v| value(v, type.args[0]) }
213
231
  when klass == ::Hash
214
- Test.call(val, IS_AP, klass) && sample(val.keys).yield_self do |keys|
215
- values = val.values_at(*keys)
216
- keys.all? {|key| value(key, type.args[0]) } && values.all? {|v| value(v, type.args[1]) }
217
- end
232
+ Test.call(val, IS_AP, klass) && each_sample(val.keys).all? do |key|
233
+ value(key, type.args[0]) && value(val[key], type.args[1])
234
+ end
218
235
  when klass == ::Range
219
236
  Test.call(val, IS_AP, klass) && value(val.begin, type.args[0]) && value(val.end, type.args[0])
220
237
  when klass == ::Enumerator
@@ -235,7 +252,7 @@ module RBS
235
252
  end
236
253
  end
237
254
 
238
- sample(values).all? do |v|
255
+ each_sample(values).all? do |v|
239
256
  if v.size == 1
240
257
  # Only one block argument.
241
258
  value(v[0], type.args[0]) || value(v, type.args[0])
@@ -253,7 +270,7 @@ module RBS
253
270
  Test.call(val, IS_AP, klass)
254
271
  end
255
272
  when Types::ClassSingleton
256
- klass = Object.const_get(type.name.to_s)
273
+ klass = get_class(type.name)
257
274
  val == klass
258
275
  when Types::Interface
259
276
  methods = Set.new(Test.call(val, METHODS))
@@ -1,3 +1,3 @@
1
1
  module RBS
2
- VERSION = "0.9.1"
2
+ VERSION = "0.10.0"
3
3
  end
@@ -251,8 +251,7 @@ module RBS
251
251
  string = ""
252
252
 
253
253
  attrs = member.attributes.empty? ? "" : member.attributes.join(" ") + " "
254
- overload = member.overload? ? "overload " : ""
255
- prefix = "#{overload}#{attrs}def #{name}:"
254
+ prefix = "#{attrs}def #{name}:"
256
255
  padding = " " * (prefix.size-1)
257
256
 
258
257
  string << prefix
@@ -266,6 +265,12 @@ module RBS
266
265
  string << " #{type}\n"
267
266
  end
268
267
 
268
+ if member.overload
269
+ string << padding
270
+ string << "|"
271
+ string << " ...\n"
272
+ end
273
+
269
274
  string.each_line do |line|
270
275
  puts line.chomp
271
276
  end
@@ -0,0 +1,392 @@
1
+ # This module provides access to the [zlib library](http://zlib.net). Zlib is
2
+ # designed to be a portable, free, general-purpose, legally unencumbered -- that
3
+ # is, not covered by any patents -- lossless data-compression library for use on
4
+ # virtually any computer hardware and operating system.
5
+ #
6
+ # The zlib compression library provides in-memory compression and decompression
7
+ # functions, including integrity checks of the uncompressed data.
8
+ #
9
+ # The zlib compressed data format is described in RFC 1950, which is a wrapper
10
+ # around a deflate stream which is described in RFC 1951.
11
+ #
12
+ # The library also supports reading and writing files in gzip (.gz) format with
13
+ # an interface similar to that of IO. The gzip format is described in RFC 1952
14
+ # which is also a wrapper around a deflate stream.
15
+ #
16
+ # The zlib format was designed to be compact and fast for use in memory and on
17
+ # communications channels. The gzip format was designed for single-file
18
+ # compression on file systems, has a larger header than zlib to maintain
19
+ # directory information, and uses a different, slower check method than zlib.
20
+ #
21
+ # See your system's zlib.h for further information about zlib
22
+ #
23
+ # ## Sample usage
24
+ #
25
+ # Using the wrapper to compress strings with default parameters is quite simple:
26
+ #
27
+ # require "zlib"
28
+ #
29
+ # data_to_compress = File.read("don_quixote.txt")
30
+ #
31
+ # puts "Input size: #{data_to_compress.size}"
32
+ # #=> Input size: 2347740
33
+ #
34
+ # data_compressed = Zlib::Deflate.deflate(data_to_compress)
35
+ #
36
+ # puts "Compressed size: #{data_compressed.size}"
37
+ # #=> Compressed size: 887238
38
+ #
39
+ # uncompressed_data = Zlib::Inflate.inflate(data_compressed)
40
+ #
41
+ # puts "Uncompressed data is: #{uncompressed_data}"
42
+ # #=> Uncompressed data is: The Project Gutenberg EBook of Don Quixote...
43
+ #
44
+ # ## Class tree
45
+ #
46
+ # * Zlib::Deflate
47
+ # * Zlib::Inflate
48
+ # * Zlib::ZStream
49
+ # * Zlib::Error
50
+ # * Zlib::StreamEnd
51
+ # * Zlib::NeedDict
52
+ # * Zlib::DataError
53
+ # * Zlib::StreamError
54
+ # * Zlib::MemError
55
+ # * Zlib::BufError
56
+ # * Zlib::VersionError
57
+ #
58
+ #
59
+ #
60
+ # (if you have GZIP_SUPPORT)
61
+ # * Zlib::GzipReader
62
+ # * Zlib::GzipWriter
63
+ # * Zlib::GzipFile
64
+ # * Zlib::GzipFile::Error
65
+ # * Zlib::GzipFile::LengthError
66
+ # * Zlib::GzipFile::CRCError
67
+ # * Zlib::GzipFile::NoFooter
68
+ #
69
+ #
70
+ #
71
+ module Zlib
72
+ # Calculates Adler-32 checksum for `string`, and returns updated value of
73
+ # `adler`. If `string` is omitted, it returns the Adler-32 initial value. If
74
+ # `adler` is omitted, it assumes that the initial value is given to `adler`.
75
+ #
76
+ # Example usage:
77
+ #
78
+ # require "zlib"
79
+ #
80
+ # data = "foo"
81
+ # puts "Adler32 checksum: #{Zlib.adler32(data).to_s(16)}"
82
+ # #=> Adler32 checksum: 2820145
83
+ #
84
+ def self.adler32: () -> Integer
85
+ | (String) -> Integer
86
+ | (String, Integer) -> Integer
87
+
88
+ # Combine two Adler-32 check values in to one. `alder1` is the first Adler-32
89
+ # value, `adler2` is the second Adler-32 value. `len2` is the length of the
90
+ # string used to generate `adler2`.
91
+ #
92
+ def self.adler32_combine: (Integer, Integer, Integer) -> Integer
93
+
94
+ # Calculates CRC checksum for `string`, and returns updated value of `crc`. If
95
+ # `string` is omitted, it returns the CRC initial value. If `crc` is omitted, it
96
+ # assumes that the initial value is given to `crc`.
97
+ #
98
+ # FIXME: expression.
99
+ #
100
+ def self.crc32: () -> Integer
101
+ | (String) -> Integer
102
+ | (String, Integer) -> Integer
103
+
104
+ # Combine two CRC-32 check values in to one. `crc1` is the first CRC-32 value,
105
+ # `crc2` is the second CRC-32 value. `len2` is the length of the string used to
106
+ # generate `crc2`.
107
+ #
108
+ def self.crc32_combine: (Integer, Integer, Integer) -> Integer
109
+
110
+ # Returns the table for calculating CRC checksum as an array.
111
+ #
112
+ def self.crc_table: () -> Array[Integer]
113
+
114
+ # Compresses the given `string`. Valid values of level are Zlib::NO_COMPRESSION,
115
+ # Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, Zlib::DEFAULT_COMPRESSION, or an
116
+ # integer from 0 to 9.
117
+ #
118
+ # This method is almost equivalent to the following code:
119
+ #
120
+ # def deflate(string, level)
121
+ # z = Zlib::Deflate.new(level)
122
+ # dst = z.deflate(string, Zlib::FINISH)
123
+ # z.close
124
+ # dst
125
+ # end
126
+ #
127
+ # See also Zlib.inflate
128
+ #
129
+ def self.deflate: (String) -> String
130
+ | (String, Integer) -> String
131
+ # Decode the given gzipped `string`.
132
+ #
133
+ # This method is almost equivalent to the following code:
134
+ #
135
+ # def gunzip(string)
136
+ # sio = StringIO.new(string)
137
+ # gz = Zlib::GzipReader.new(sio, encoding: Encoding::ASCII_8BIT)
138
+ # gz.read
139
+ # ensure
140
+ # gz&.close
141
+ # end
142
+ #
143
+ # See also Zlib.gzip
144
+ #
145
+ def self.gunzip: (String) -> String
146
+
147
+ # Gzip the given `string`. Valid values of level are Zlib::NO_COMPRESSION,
148
+ # Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, Zlib::DEFAULT_COMPRESSION (default),
149
+ # or an integer from 0 to 9.
150
+ #
151
+ # This method is almost equivalent to the following code:
152
+ #
153
+ # def gzip(string, level: nil, strategy: nil)
154
+ # sio = StringIO.new
155
+ # sio.binmode
156
+ # gz = Zlib::GzipWriter.new(sio, level, strategy)
157
+ # gz.write(string)
158
+ # gz.close
159
+ # sio.string
160
+ # end
161
+ #
162
+ # See also Zlib.gunzip
163
+ #
164
+ def self.gzip: (String) -> String
165
+ | (String, level: Integer) -> String
166
+ | (String, strategy: Integer) -> String
167
+ | (String, level: Integer, strategy: Integer) -> String
168
+ # Decompresses `string`. Raises a Zlib::NeedDict exception if a preset
169
+ # dictionary is needed for decompression.
170
+ #
171
+ # This method is almost equivalent to the following code:
172
+ #
173
+ # def inflate(string)
174
+ # zstream = Zlib::Inflate.new
175
+ # buf = zstream.inflate(string)
176
+ # zstream.finish
177
+ # zstream.close
178
+ # buf
179
+ # end
180
+ #
181
+ # See also Zlib.deflate
182
+ #
183
+ def self.inflate: (String) -> String
184
+
185
+ # Returns the string which represents the version of zlib library.
186
+ #
187
+ def self.zlib_version: () -> String
188
+ end
189
+
190
+ # Represents text data as guessed by deflate.
191
+ #
192
+ # NOTE: The underlying constant Z_ASCII was deprecated in favor of Z_TEXT in
193
+ # zlib 1.2.2. New applications should not use this constant.
194
+ #
195
+ # See Zlib::Deflate#data_type.
196
+ #
197
+ #
198
+ Zlib::ASCII: Integer
199
+
200
+ # Slowest compression level, but with the best space savings.
201
+ #
202
+ #
203
+ Zlib::BEST_COMPRESSION: Integer
204
+
205
+ # Fastest compression level, but with the lowest space savings.
206
+ #
207
+ #
208
+ Zlib::BEST_SPEED: Integer
209
+
210
+ # Represents binary data as guessed by deflate.
211
+ #
212
+ # See Zlib::Deflate#data_type.
213
+ #
214
+ #
215
+ Zlib::BINARY: Integer
216
+
217
+ # Default compression level which is a good trade-off between space and time
218
+ #
219
+ Zlib::DEFAULT_COMPRESSION: Integer
220
+
221
+ # Default deflate strategy which is used for normal data.
222
+ #
223
+ #
224
+ Zlib::DEFAULT_STRATEGY: Integer
225
+
226
+ # The default memory level for allocating zlib deflate compression state.
227
+ #
228
+ Zlib::DEF_MEM_LEVEL: Integer
229
+
230
+ # Deflate strategy for data produced by a filter (or predictor). The effect of
231
+ # FILTERED is to force more Huffman codes and less string matching; it is
232
+ # somewhat intermediate between DEFAULT_STRATEGY and HUFFMAN_ONLY. Filtered data
233
+ # consists mostly of small values with a somewhat random distribution.
234
+ #
235
+ Zlib::FILTERED: Integer
236
+
237
+ # Processes all pending input and flushes pending output.
238
+ #
239
+ #
240
+ Zlib::FINISH: Integer
241
+
242
+ # Deflate strategy which prevents the use of dynamic Huffman codes, allowing for
243
+ # a simpler decoder for specialized applications.
244
+ #
245
+ Zlib::FIXED: Integer
246
+
247
+ # Flushes all output as with SYNC_FLUSH, and the compression state is reset so
248
+ # that decompression can restart from this point if previous compressed data has
249
+ # been damaged or if random access is desired. Like SYNC_FLUSH, using FULL_FLUSH
250
+ # too often can seriously degrade compression.
251
+ #
252
+ Zlib::FULL_FLUSH: Integer
253
+
254
+ # Deflate strategy which uses Huffman codes only (no string matching).
255
+ #
256
+ #
257
+ Zlib::HUFFMAN_ONLY: Integer
258
+
259
+ # The maximum memory level for allocating zlib deflate compression state.
260
+ #
261
+ Zlib::MAX_MEM_LEVEL: Integer
262
+
263
+ # The maximum size of the zlib history buffer. Note that zlib allows larger
264
+ # values to enable different inflate modes. See Zlib::Inflate.new for details.
265
+ #
266
+ Zlib::MAX_WBITS: Integer
267
+
268
+ # No compression, passes through data untouched. Use this for appending
269
+ # pre-compressed data to a deflate stream.
270
+ #
271
+ Zlib::NO_COMPRESSION: Integer
272
+
273
+ # NO_FLUSH is the default flush method and allows deflate to decide how much
274
+ # data to accumulate before producing output in order to maximize compression.
275
+ #
276
+ Zlib::NO_FLUSH: Integer
277
+
278
+ # OS code for Amiga hosts
279
+ #
280
+ #
281
+ Zlib::OS_AMIGA: Integer
282
+
283
+ # OS code for Atari hosts
284
+ #
285
+ #
286
+ Zlib::OS_ATARI: Integer
287
+
288
+ # The OS code of current host
289
+ #
290
+ #
291
+ Zlib::OS_CODE: Integer
292
+
293
+ # OS code for CP/M hosts
294
+ #
295
+ #
296
+ Zlib::OS_CPM: Integer
297
+
298
+ # OS code for Mac OS hosts
299
+ #
300
+ #
301
+ Zlib::OS_MACOS: Integer
302
+
303
+ # OS code for MSDOS hosts
304
+ #
305
+ #
306
+ Zlib::OS_MSDOS: Integer
307
+
308
+ # OS code for OS2 hosts
309
+ #
310
+ #
311
+ Zlib::OS_OS2: Integer
312
+
313
+ # OS code for QDOS hosts
314
+ #
315
+ #
316
+ Zlib::OS_QDOS: Integer
317
+
318
+ # OS code for RISC OS hosts
319
+ #
320
+ #
321
+ Zlib::OS_RISCOS: Integer
322
+
323
+ # OS code for TOPS-20 hosts
324
+ #
325
+ #
326
+ Zlib::OS_TOPS20: Integer
327
+
328
+ # OS code for UNIX hosts
329
+ #
330
+ #
331
+ Zlib::OS_UNIX: Integer
332
+
333
+ # OS code for unknown hosts
334
+ #
335
+ #
336
+ Zlib::OS_UNKNOWN: Integer
337
+
338
+ # OS code for VM OS hosts
339
+ #
340
+ #
341
+ Zlib::OS_VMCMS: Integer
342
+
343
+ # OS code for VMS hosts
344
+ #
345
+ #
346
+ Zlib::OS_VMS: Integer
347
+
348
+ # OS code for Win32 hosts
349
+ #
350
+ #
351
+ Zlib::OS_WIN32: Integer
352
+
353
+ # OS code for Z-System hosts
354
+ #
355
+ #
356
+ Zlib::OS_ZSYSTEM: Integer
357
+
358
+ # Deflate compression strategy designed to be almost as fast as HUFFMAN_ONLY,
359
+ # but give better compression for PNG image data.
360
+ #
361
+ Zlib::RLE: Integer
362
+
363
+ # The SYNC_FLUSH method flushes all pending output to the output buffer and the
364
+ # output is aligned on a byte boundary. Flushing may degrade compression so it
365
+ # should be used only when necessary, such as at a request or response boundary
366
+ # for a network stream.
367
+ #
368
+ Zlib::SYNC_FLUSH: Integer
369
+
370
+ # Represents text data as guessed by deflate.
371
+ #
372
+ # See Zlib::Deflate#data_type.
373
+ #
374
+ #
375
+ Zlib::TEXT: Integer
376
+
377
+ # Represents an unknown data type as guessed by deflate.
378
+ #
379
+ # See Zlib::Deflate#data_type.
380
+ #
381
+ #
382
+ Zlib::UNKNOWN: Integer
383
+
384
+ # The Ruby/zlib version string.
385
+ #
386
+ #
387
+ Zlib::VERSION: String
388
+
389
+ # The string which represents the version of zlib.h
390
+ #
391
+ #
392
+ Zlib::ZLIB_VERSION: String
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soutaro Matsumoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-04 00:00:00.000000000 Z
11
+ date: 2020-08-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: RBS is the language for type signatures for Ruby and standard library
14
14
  definitions.
@@ -174,6 +174,7 @@ files:
174
174
  - stdlib/securerandom/securerandom.rbs
175
175
  - stdlib/set/set.rbs
176
176
  - stdlib/tmpdir/tmpdir.rbs
177
+ - stdlib/zlib/zlib.rbs
177
178
  homepage: https://github.com/ruby/rbs
178
179
  licenses:
179
180
  - BSD-2-Clause