rbs 1.7.0.beta.5 → 1.7.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.
data/core/false_class.rbs CHANGED
@@ -37,4 +37,6 @@ class FalseClass
37
37
  def |: (nil) -> false
38
38
  | (false) -> false
39
39
  | (untyped obj) -> true
40
+
41
+ def clone: (?freeze: true?) -> self
40
42
  end
data/core/nil_class.rbs CHANGED
@@ -79,4 +79,6 @@ class NilClass
79
79
  def |: (nil) -> false
80
80
  | (false) -> false
81
81
  | (untyped obj) -> bool
82
+
83
+ def clone: (?freeze: true?) -> self
82
84
  end
data/core/symbol.rbs CHANGED
@@ -226,4 +226,6 @@ class Symbol
226
226
  | (:ascii | :lithuanian | :turkic) -> Symbol
227
227
  | (:lithuanian, :turkic) -> Symbol
228
228
  | (:turkic, :lithuanian) -> Symbol
229
+
230
+ def clone: (?freeze: true?) -> self
229
231
  end
data/core/true_class.rbs CHANGED
@@ -43,4 +43,6 @@ class TrueClass
43
43
  # or
44
44
  #
45
45
  def |: (untyped obj) -> true
46
+
47
+ def clone: (?freeze: true?) -> self
46
48
  end
@@ -13,6 +13,7 @@ begin
13
13
  filter = ENV.fetch('RBS_TEST_TARGET', "").split(',').map! { |e| e.strip }
14
14
  skips = (ENV['RBS_TEST_SKIP'] || '').split(',').map! { |e| e.strip }
15
15
  RBS.logger_level = (ENV["RBS_TEST_LOGLEVEL"] || "info")
16
+ logger.level = RBS.logger_level
16
17
  sample_size = get_sample_size(ENV['RBS_TEST_SAMPLE_SIZE'] || '')
17
18
  double_class = to_double_class(ENV['RBS_TEST_DOUBLE_SUITE'])
18
19
  unchecked_classes = (ENV['RBS_TEST_UNCHECKED_CLASSES'] || '').split(',').map! { |unchecked_class| unchecked_class.strip }.push(*double_class)
data/lib/rbs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RBS
2
- VERSION = "1.7.0.beta.5"
2
+ VERSION = "1.7.0"
3
3
  end
@@ -885,3 +885,47 @@ BigDecimal::SIGN_POSITIVE_ZERO: Integer
885
885
  # The version of bigdecimal library
886
886
  #
887
887
  BigDecimal::VERSION: String
888
+
889
+ module Kernel
890
+ private
891
+
892
+ # Create a new BigDecimal object.
893
+ #
894
+ # initial
895
+ # : The initial value, as an Integer, a Float, a Rational, a BigDecimal, or a
896
+ # String.
897
+ #
898
+ # If it is a String, spaces are ignored and unrecognized characters
899
+ # terminate the value.
900
+ #
901
+ # digits
902
+ # : The number of significant digits, as an Integer. If omitted or 0, the
903
+ # number of significant digits is determined from the initial value.
904
+ #
905
+ # The actual number of significant digits used in computation is usually
906
+ # larger than the specified number.
907
+ #
908
+ # exception
909
+ # : Whether an exception should be raised on invalid arguments. `true` by
910
+ # default, if passed `false`, just returns `nil` for invalid.
911
+ #
912
+ #
913
+ # #### Exceptions
914
+ #
915
+ # TypeError
916
+ # : If the `initial` type is neither Integer, Float, Rational, nor BigDecimal,
917
+ # this exception is raised.
918
+ #
919
+ # TypeError
920
+ # : If the `digits` is not an Integer, this exception is raised.
921
+ #
922
+ # ArgumentError
923
+ # : If `initial` is a Float, and the `digits` is larger than Float::DIG + 1,
924
+ # this exception is raised.
925
+ #
926
+ # ArgumentError
927
+ # : If the `initial` is a Float or Rational, and the `digits` value is
928
+ # omitted, this exception is raised.
929
+ #
930
+ def self?.BigDecimal: ((real | string | BigDecimal) initial, ?int digits, ?exception: bool) -> BigDecimal
931
+ end
data/stdlib/csv/0/csv.rbs CHANGED
@@ -360,6 +360,49 @@ class CSV < Object
360
360
  # output non-ASCII compatible data.
361
361
  #
362
362
  def self.generate: (?String str, **untyped options) { (CSV csv) -> void } -> String
363
+
364
+ # :call-seq:
365
+ # csv.each -> enumerator
366
+ # csv.each {|row| ...}
367
+ #
368
+ # Calls the block with each successive row.
369
+ # The data source must be opened for reading.
370
+ #
371
+ # Without headers:
372
+ # string = "foo,0\nbar,1\nbaz,2\n"
373
+ # csv = CSV.new(string)
374
+ # csv.each do |row|
375
+ # p row
376
+ # end
377
+ # Output:
378
+ # ["foo", "0"]
379
+ # ["bar", "1"]
380
+ # ["baz", "2"]
381
+ #
382
+ # With headers:
383
+ # string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
384
+ # csv = CSV.new(string, headers: true)
385
+ # csv.each do |row|
386
+ # p row
387
+ # end
388
+ # Output:
389
+ # <CSV::Row "Name":"foo" "Value":"0">
390
+ # <CSV::Row "Name":"bar" "Value":"1">
391
+ # <CSV::Row "Name":"baz" "Value":"2">
392
+ #
393
+ # ---
394
+ #
395
+ # Raises an exception if the source is not opened for reading:
396
+ # string = "foo,0\nbar,1\nbaz,2\n"
397
+ # csv = CSV.new(string)
398
+ # csv.close
399
+ # # Raises IOError (not opened for reading)
400
+ # csv.each do |row|
401
+ # p row
402
+ # end
403
+ def each: () -> Enumerator[untyped, Integer]
404
+ | () { (untyped) -> void } -> Integer
405
+
363
406
  end
364
407
 
365
408
  # The options used when no overrides are given by calling code. They are:
@@ -408,7 +451,7 @@ CSV::VERSION: String
408
451
  # processing is activated.
409
452
  #
410
453
  class CSV::Row < Object
411
- include Enumerable[untyped]
454
+ include Enumerable[Array[String]]
412
455
  extend Forwardable
413
456
 
414
457
  # If a two-element Array is provided, it is assumed to be a header and field and
@@ -464,7 +507,8 @@ class CSV::Row < Object
464
507
  #
465
508
  # Support for Enumerable.
466
509
  #
467
- def each: () { (*untyped) -> untyped } -> untyped
510
+ def each: () -> Enumerator[Array[String], self]
511
+ | () { (Array[String]) -> void } -> self
468
512
 
469
513
  alias each_pair each
470
514
 
@@ -717,7 +761,9 @@ class CSV::Table[out Elem] < Object
717
761
  #
718
762
  # If no block is given, an Enumerator is returned.
719
763
  #
720
- def each: () { (*untyped) -> untyped } -> untyped
764
+ def each: () -> Enumerator[untyped, self]
765
+ | () { (untyped) -> void } -> self
766
+ | () { (*untyped) -> void } -> self
721
767
 
722
768
  def empty?: (*untyped args) { (*untyped) -> untyped } -> untyped
723
769
 
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: 1.7.0.beta.5
4
+ version: 1.7.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: 2021-11-07 00:00:00.000000000 Z
11
+ date: 2021-11-11 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.
@@ -44,6 +44,7 @@ files:
44
44
  - core/encoding.rbs
45
45
  - core/enumerable.rbs
46
46
  - core/enumerator.rbs
47
+ - core/env.rbs
47
48
  - core/errno.rbs
48
49
  - core/errors.rbs
49
50
  - core/exception.rbs
@@ -152,7 +153,6 @@ files:
152
153
  - lib/rbs/locator.rb
153
154
  - lib/rbs/method_type.rb
154
155
  - lib/rbs/namespace.rb
155
- - lib/rbs/parser.y
156
156
  - lib/rbs/parser_aux.rb
157
157
  - lib/rbs/parser_compat/lexer_error.rb
158
158
  - lib/rbs/parser_compat/located_value.rb
@@ -341,9 +341,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
341
341
  version: '2.6'
342
342
  required_rubygems_version: !ruby/object:Gem::Requirement
343
343
  requirements:
344
- - - ">"
344
+ - - ">="
345
345
  - !ruby/object:Gem::Version
346
- version: 1.3.1
346
+ version: '0'
347
347
  requirements: []
348
348
  rubygems_version: 3.2.22
349
349
  signing_key: