8000 time.c: update error message for invalid utc_offset · github/ruby@347f3f3 · GitHub
[go: up one dir, main page]

Skip to content
10000

Commit 347f3f3

Browse files
committed
time.c: update error message for invalid utc_offset
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 78d6e33 commit 347f3f3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

time.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,10 @@ NORETURN(static void invalid_utc_offset(void));
20472047
static void
20482048
invalid_utc_offset(void)
20492049
{
2050-
rb_raise(rb_eArgError, "\"+HH:MM\" or \"-HH:MM\" expected for utc_offset");
2050+
static const char message[] = "\"+HH:MM\", \"-HH:MM\", \"UTC\" "
2051+
"or \"A\"..\"I\",\"K\"..\"Z\" expected for utc_offset";
2052+
VALUE str = rb_usascii_str_new_static(message, sizeof(message)-1);
2053+
rb_exc_raise(rb_exc_new_str(rb_eArgError, str));
20512054
}
20522055

20532056
static VALUE

0 commit comments

Comments
 (0)
0