Skip to content

Commit b98a74e

Browse files
committed
Kernel#j and Kernel#jj has been deprecated
ruby/json@27155b6
1 parent 17fd55f commit b98a74e

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

stdlib/json/0/json.rbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,7 @@ module Kernel
11571157
# Outputs *objs* to STDOUT as JSON strings in the shortest form, that is in one
11581158
# line.
11591159
#
1160+
%a{deprecated}
11601161
def j: (*_ToJson) -> nil
11611162

11621163
# <!--
@@ -1166,6 +1167,7 @@ module Kernel
11661167
# Outputs *objs* to STDOUT as JSON strings in a pretty format, with indentation
11671168
# and over many lines.
11681169
#
1170+
%a{deprecated}
11691171
def jj: (*_ToJson) -> nil
11701172

11711173
# <!--

test/stdlib/json/JSONKernel_test.rb

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,6 @@ class JSONKernelInstanceTest < Test::Unit::TestCase
77
library "json"
88
testing "::Kernel"
99

10-
def silent
11-
orig_stdout = $stdout
12-
$stdout = StringIO.new
13-
yield
14-
ensure
15-
$stdout = orig_stdout
16-
end
17-
18-
def test_j
19-
silent do
20-
assert_send_type("(Integer) -> nil", self, :j, 1)
21-
assert_send_type("(Array[Integer]) -> nil", self, :j, [1, 2, 3])
22-
end
23-
end
24-
25-
def test_jj
26-
silent do
27-
assert_send_type("(Integer) -> nil", self, :jj, 1)
28-
assert_send_type("(Array[Integer]) -> nil", self, :jj, [1, 2, 3])
29-
end
30-
end
31-
3210
def test_JSON
3311
assert_send_type("(String) -> Hash[String, Integer]", self, :JSON, '{"a": 1}')
3412
assert_send_type("(Array[Integer]) -> String", self, :JSON, [1, 2, 3])

0 commit comments

Comments
 (0)