Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions stdlib/digest/0/digest.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@
# http://csrc.nist.gov/publications/PubsFIPS.html.
#
module Digest
# <!-- rdoc-file=ext/digest/lib/digest/version.rb -->
# The version string
#
VERSION: String
# <!--
# rdoc-file=ext/digest/bubblebabble/bubblebabble.c
# - Digest.bubblebabble(string) -> bubblebabble_string
Expand Down
9 changes: 9 additions & 0 deletions stdlib/forwardable/0/forwardable.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ module Forwardable
#
FORWARDABLE_VERSION: String

# <!-- rdoc-file=lib/forwardable.rb -->
# ignored
#
def self.debug: () -> boolish
# <!-- rdoc-file=lib/forwardable.rb -->
# ignored
#
def self.debug=: (boolish) -> void

# <!--
# rdoc-file=lib/forwardable.rb
# - delegate method => accessor
Expand Down
8 changes: 8 additions & 0 deletions stdlib/random-formatter/0/random-formatter.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,11 @@ module RBS
end
end
end

%a{annotate:rdoc:skip}
module Random::Formatter
# <!-- rdoc-file=lib/random/formatter.rb -->
# The default character list for #alphanumeric.
#
ALPHANUMERIC: Array[String]
end
2 changes: 2 additions & 0 deletions stdlib/singleton/0/singleton.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ module Singleton
#
VERSION: String

def self.module_with_class_methods: () -> singleton(Singleton::SingletonClassMethods)

module SingletonInstanceMethods
def clone: () -> bot

Expand Down
2 changes: 2 additions & 0 deletions stdlib/time/0/manifest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dependencies:
- name: date
2 changes: 2 additions & 0 deletions stdlib/time/0/time.rbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
%a{annotate:rdoc:skip}
class Time
VERSION: String

interface _TimeLike
def year: () -> Integer

Expand Down
4 changes: 4 additions & 0 deletions stdlib/tsort/0/tsort.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
# *SIAM Journal on Computing*, Vol. 1, No. 2, pp. 146-160, June 1972.
#
module TSort[N] : TSort::_Sortable[N]
# <!-- rdoc-file=lib/tsort.rb -->
# The version string.
#
VERSION: String
# <!--
# rdoc-file=lib/tsort.rb
# - each_strongly_connected_component(each_node, each_child) { |nodes| ... }
Expand Down
24 changes: 24 additions & 0 deletions test/stdlib/Forwardable_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
require_relative "test_helper"
require "forwardable"

class ForwardableSingletonTest < Test::Unit::TestCase
include TestHelper

library "forwardable"
testing "singleton(::Forwardable)"

def test_constants
assert_const_type "String", "Forwardable::VERSION"
assert_const_type "String", "Forwardable::FORWARDABLE_VERSION"
end

def test_debug
assert_send_type "() -> boolish",
Forwardable, :debug
end

def test_debug_assign
assert_send_type "(boolish) -> void",
Forwardable, :debug=, true
ensure
Forwardable.debug = nil
end
end

class ForwardableTest < Test::Unit::TestCase
include TestHelper

Expand Down
4 changes: 4 additions & 0 deletions test/stdlib/Random_Formatter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ class RandomFormatterSingletonTest < Test::Unit::TestCase
library "random-formatter"
testing "singleton(::Random)"

def test_alphanumeric_constant
assert_const_type "Array[String]", "Random::Formatter::ALPHANUMERIC"
end

def test_base64
assert_send_type "() -> ::String",
Random, :base64
Expand Down
4 changes: 4 additions & 0 deletions test/stdlib/TSort_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ class TSortSingletonTest < Test::Unit::TestCase
library 'tsort'
testing "singleton(::TSort)"

def test_version
assert_const_type "String", "TSort::VERSION"
end

class EachNode
def initialize(*nodes)
@nodes = nodes
Expand Down
4 changes: 4 additions & 0 deletions test/stdlib/TimeExtension_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ def initialize(mon, day, year)
end
end

def test_version
assert_const_type "String", "Time::VERSION"
end

def test_zone_offset
assert_send_type "(String) -> Integer",
Time, :zone_offset, "EST"
Expand Down
4 changes: 4 additions & 0 deletions test/stdlib/digest/Digest_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ class DigestSingletonTest < Test::Unit::TestCase
testing 'singleton(::Digest)'


def test_version
assert_const_type "String", "Digest::VERSION"
end

def test_const_missing
assert_send_type '(::Symbol name) -> singleton(::Digest::Base)',
::Digest, :const_missing, :SHA1
Expand Down
11 changes: 10 additions & 1 deletion test/stdlib/singleton_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class SingletonSingletonTest < Test::Unit::TestCase
include TestHelper

library 'singleton'
testing 'singleton(::Singleton)'

Expand All @@ -16,4 +16,13 @@ def test_singleton_instance_methods

assert_const_type "Module", "Singleton::SingletonInstanceMethods"
end

def test_version
assert_const_type "String", "Singleton::VERSION"
end

def test_module_with_class_methods
assert_send_type "() -> singleton(Singleton::SingletonClassMethods)",
Singleton, :module_with_class_methods
end
end
Loading