1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Turned to_be_skipped_id to an inline function

This commit is contained in:
Nobuyoshi Nakada 2021-09-22 23:16:27 +09:00
parent e0c6e8c64a
commit 842a4cb915
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -573,7 +573,14 @@ w_uclass(VALUE obj, VALUE super, struct dump_arg *arg)
} }
} }
#define to_be_skipped_id(id) (id == rb_id_encoding() || id == s_encoding_short || id == s_ruby2_keywords_flag || !rb_id2str(id)) static inline bool
to_be_skipped_id(const ID id)
{
if (id == s_encoding_short) return true;
if (id == s_ruby2_keywords_flag) return true;
if (id == rb_id_encoding()) return true;
return !rb_id2str(id);
}
struct w_ivar_arg { struct w_ivar_arg {
struct dump_call_arg *dump; struct dump_call_arg *dump;