Skip to content

Commit

Permalink
Merge pull request #2207 from ruby/time-xmlschema
Browse files Browse the repository at this point in the history
`Time#xmlschema` accepts `Integer` argument
  • Loading branch information
soutaro authored Dec 27, 2024
2 parents f347cf9 + b046909 commit c4f3dd8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/time.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ class Time < Object
#
# You must require 'time' to use this method.
#
def xmlschema: () -> String
def xmlschema: (?Integer fraction_digits) -> String

# <!--
# rdoc-file=time.c
Expand Down
8 changes: 4 additions & 4 deletions test/stdlib/Time_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,10 @@ def test_to_a
end

def test_xmlschema
if_ruby("3.4.0"...) do
assert_send_type "() -> String",
Time.now, :xmlschema
end
assert_send_type "() -> String",
Time.now, :xmlschema
assert_send_type "(Integer) -> String",
Time.now, :xmlschema, 3
end

def test_zone
Expand Down

0 comments on commit c4f3dd8

Please sign in to comment.