diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-14 03:35:54 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-14 03:35:54 +0000 |
commit | 0b2554fe7ecb04001401edf94c2f11a405d54a28 (patch) | |
tree | d717a11959082899ad5a48ddf7ddb7577bc7a7e6 /ext/tk/tkutil/tkutil.c | |
parent | da4942c9d7924dcfad7d0977ce80f701c46fbdca (diff) |
tkutil.c: use rb_sym2str
* ext/tk/tkutil/tkutil.c (rb_sym2str): use rb_sym2str always but
not rb_sym_to_s, and fallback to rb_id2str and SYM2ID.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/tkutil/tkutil.c')
-rw-r--r-- | ext/tk/tkutil/tkutil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/tkutil/tkutil.c b/ext/tk/tkutil/tkutil.c index 26ae957bf2..f3450b12d8 100644 --- a/ext/tk/tkutil/tkutil.c +++ b/ext/tk/tkutil/tkutil.c @@ -42,6 +42,10 @@ static int rb_thread_critical; /* dummy */ extern char *strndup(const char* _ptr, size_t _len); #endif +#ifndef HAVE_RB_SYM2STR +# define rb_sym2str(obj) rb_id2str(SYM2ID(obj)) +#endif + static VALUE cMethod; static VALUE cTclTkLib; @@ -839,11 +843,7 @@ get_eval_string_core(obj, enc_flag, self) return fromDefaultEnc_toUTF8(rb_sym2str(obj), self); } } else { -#ifdef HAVE_RB_SYM_TO_S - return rb_sym_to_s(obj); -#else return rb_sym2str(obj); -#endif } case T_HASH: |