зеркало из https://github.com/github/ruby.git
* error.c (rb_loaderror): use locale string, not ascii-8bit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
df54a2e6be
Коммит
40caeb6bd1
|
@ -1,3 +1,7 @@
|
|||
Sun May 16 13:55:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* error.c (rb_loaderror): use locale string, not ascii-8bit.
|
||||
|
||||
Sun May 16 11:39:15 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/missing.h (signbit): add missing prototype.
|
||||
|
|
|
@ -540,7 +540,8 @@ enum.$(OBJEXT): {$(VPATH)}enum.c $(RUBY_H_INCLUDES) {$(VPATH)}node.h \
|
|||
{$(VPATH)}util.h
|
||||
enumerator.$(OBJEXT): {$(VPATH)}enumerator.c $(RUBY_H_INCLUDES)
|
||||
error.$(OBJEXT): {$(VPATH)}error.c {$(VPATH)}known_errors.inc \
|
||||
$(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}debug.h
|
||||
$(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) $(ENCODING_H_INCLUDES) \
|
||||
{$(VPATH)}debug.h
|
||||
eval.$(OBJEXT): {$(VPATH)}eval.c {$(VPATH)}eval_intern.h {$(VPATH)}vm.h \
|
||||
$(RUBY_H_INCLUDES) $(VM_CORE_H_INCLUDES) {$(VPATH)}eval_error.c \
|
||||
{$(VPATH)}eval_jump.c {$(VPATH)}debug.h {$(VPATH)}gc.h {$(VPATH)}iseq.h
|
||||
|
|
3
error.c
3
error.c
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "ruby/ruby.h"
|
||||
#include "ruby/st.h"
|
||||
#include "ruby/encoding.h"
|
||||
#include "vm_core.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1469,7 +1470,7 @@ rb_loaderror(const char *fmt, ...)
|
|||
VALUE mesg;
|
||||
|
||||
va_start(args, fmt);
|
||||
mesg = rb_vsprintf(fmt, args);
|
||||
mesg = rb_enc_vsprintf(rb_locale_encoding(), fmt, args);
|
||||
va_end(args);
|
||||
rb_exc_raise(rb_exc_new3(rb_eLoadError, mesg));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче