summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-03-18 14:25:47 +0900
committerJeremy Evans <code@jeremyevans.net>2019-08-30 12:39:31 -0700
commit16c6984bb97409029e213154ac4f633ae04af3d8 (patch)
tree53839e4d596e4016320097530ff5d7fcf19d11e6 /class.c
parentb0a291f6f6a5834fd84807eb48be906ade429871 (diff)
Separate keyword arguments from positional arguments
And, allow non-symbol keys as a keyword arugment
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2395
Diffstat (limited to 'class.c')
-rw-r--r--class.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/class.c b/class.c
index 2e87101..6b3b662 100644
--- a/class.c
+++ b/class.c
@@ -1830,8 +1830,7 @@ rb_keyword_error_new(const char *error, VALUE keys)
rb_str_cat_cstr(error_message, ": ");
while (1) {
const VALUE k = RARRAY_AREF(keys, i);
- Check_Type(k, T_SYMBOL); /* wrong hash is given to rb_get_kwargs */
- rb_str_append(error_message, rb_sym2str(k));
+ rb_str_append(error_message, rb_inspect(k));
if (++i >= len) break;
rb_str_cat_cstr(error_message, ", ");
}