Issue #5896 has been updated by Nobuyoshi Nakada.

Subject changed from object representaion in rb_enc_vsprintf() to object representation in rb_enc_vsprintf()


----------------------------------------
Feature #5896: object representation in rb_enc_vsprintf()
https://bugs.ruby-lang.org/issues/5896#change-24674

Author: Nobuyoshi Nakada
Status: Open
Priority: Normal
Assignee: Yukihiro Matsumoto
Category: core
Target version: 2.0.0


=begin
(({rb_enc_vsprintf()}))???(({VALUE}))???????????????????????????????張???????

???????????????????????????????????????????????????????????
(({StringValueCStr()}))???(({RSTRING_PTR()}))??????????????????????(({snprintf()}))????渡
???????????????????????????????????????????????????????????????????????
???????????(({VALUE}))??????????????????dangling pointer????????????????????
??????????????????????????????????????????(({rb_raise()}))??????????(({NORETURN}))????
???渡????????????tail-call?????????????????(({RB_GC_GUARD}))?????????????????
??????????????????????????????????????????????????????????????????????????

????????????????解?????????????????(({rb_enc_vsprintf}))(????????????????使????????)???
(({VALUE}))?????????????????????????????張????????????????????????????????????????????
?????????????????????????(%v????)???追??????????????????????????????????gcc????
???????????????????????????????????????警??????????????????????

????????????????Linux Kernel????(({printk()}))??対??????似?????????????????????????
??????????????(({%p}))???????????????????????????????????????????????????????????
?????????[1]????????????????20????????????????????????????

[1] [[URL|http://lxr.free-electrons.com/source/lib/vsprintf.c#L1116]]

Ruby??????????????身?????????????????????????????????????????????????????使??
??????????????????????????????????????????????????????????????????????????????
????(({"%lo\v"}))??????????????????????????????????????????

以????????????????????((%error.c%))???????(({rb_invalid_str()}))??????????????????????

  void
  rb_invalid_str(const char *str, const char *type)
  {
      VALUE s = rb_str_inspect(rb_str_new2(str));

      rb_raise(rb_eArgError, "invalid value for %s: %"PRIsVALUE, type, s);
  }

=end



-- 
http://bugs.ruby-lang.org/