mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
2e37c1960a
commit
913807bd6c
2 changed files with 4 additions and 5 deletions
|
@ -6573,11 +6573,8 @@ static VALUE
|
||||||
mk_inspect(union DateData *x, VALUE klass, VALUE to_s)
|
mk_inspect(union DateData *x, VALUE klass, VALUE to_s)
|
||||||
{
|
{
|
||||||
return rb_enc_sprintf(rb_usascii_encoding(),
|
return rb_enc_sprintf(rb_usascii_encoding(),
|
||||||
"#<%"PRIsVALUE": %"PRIsVALUE" "
|
"#<%"PRIsVALUE": %"PRIsVALUE">",
|
||||||
"((%+"PRIsVALUE"j,%ds,%+"PRIsVALUE"n),%+ds,%.0fj)>",
|
klass, to_s);
|
||||||
klass, to_s,
|
|
||||||
m_real_jd(x), m_df(x), m_sf(x),
|
|
||||||
m_of(x), m_sg(x));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -282,8 +282,10 @@ class TestSH < Test::Unit::TestCase
|
||||||
def test_inspect
|
def test_inspect
|
||||||
d = Date.new(2001, 2, 3)
|
d = Date.new(2001, 2, 3)
|
||||||
assert_equal(Encoding::US_ASCII, d.inspect.encoding)
|
assert_equal(Encoding::US_ASCII, d.inspect.encoding)
|
||||||
|
assert_equal('#<Date: 2001-02-03>', d.inspect)
|
||||||
d = DateTime.new(2001, 2, 3)
|
d = DateTime.new(2001, 2, 3)
|
||||||
assert_equal(Encoding::US_ASCII, d.inspect.encoding)
|
assert_equal(Encoding::US_ASCII, d.inspect.encoding)
|
||||||
|
assert_equal('#<DateTime: 2001-02-03T00:00:00+00:00>', d.inspect)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_strftime
|
def test_strftime
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue