Skip to content

Commit

Permalink
Merge pull request #497 from nobu/remove-DBM-index
Browse files Browse the repository at this point in the history
Remove deprecated DBM#index
  • Loading branch information
soutaro authored Dec 2, 2020
2 parents 7838502 + 829177b commit 68df209
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions stdlib/dbm/0/dbm.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ class DBM
#
def include?: (String) -> bool

def index: (untyped) -> (String | NilClass)

# Returns a Hash (not a DBM database) created by using each value in the
# database as a key, with the corresponding key as its value.
#
Expand Down
6 changes: 0 additions & 6 deletions test/stdlib/DBM_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ def test_invert
assert_send_type "() -> Hash[untyped, String]", @dbm, :invert
end

def test_index
@dbm["key3"] = 1
assert_send_type "(untyped) -> (String | NilClass)", @dbm, :index, "key1"
assert_send_type "(untyped) -> (String | NilClass)", @dbm, :index, "keaaaay1"
end

def test_key
@dbm["key_key"] = 1
assert_send_type "(untyped) -> (String | NilClass)", @dbm, :key, "key_key"
Expand Down

0 comments on commit 68df209

Please sign in to comment.