Skip to content
Draft
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
2 changes: 2 additions & 0 deletions stdlib/psych/0/core_ext.rbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
%a{annotate:rdoc:skip}
class Object
def self.yaml_tag: (String url) -> String

# <!--
# rdoc-file=ext/psych/lib/psych/core_ext.rb
# - to_yaml(options = {})
Expand Down
17 changes: 17 additions & 0 deletions test/stdlib/psych_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,20 @@ def test_to_yaml
)
end
end

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

library "psych"
testing "singleton(::Object)"

class Tagged
end

def test_yaml_tag
assert_send_type(
"(::String) -> ::String",
Tagged, :yaml_tag, "!rbs-test/tagged"
)
end
end
Loading