File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -75,14 +75,15 @@ PRINTF_ARGS(void rb_warn_deprecated_to_remove(const char *removal, const char *f
75
75
RBIMPL_ATTR_FORCEINLINE ()
76
76
static void
77
77
rb_deprecated_method_to_be_removed (const char * removal )
78
+ RBIMPL_ATTR_DIAGNOSE_IF (!RUBY_VERSION_isdigit (removal [0 ]), "malformed version number ", "error ")
78
79
RBIMPL_ATTR_DIAGNOSE_IF (RUBY_VERSION_SINCE (removal ), "deprecated method to be removed ", "error ")
79
80
{
80
81
}
81
82
# else
82
83
RBIMPL_ATTR_ERROR (("deprecated" ))
83
84
void rb_deprecated_method_to_be_removed (const char * );
84
85
# define rb_deprecated_method_to_be_removed (removal ) \
85
- (sizeof(char[1-2*RUBY_VERSION_SINCE(removal)])!=1 ? \
86
+ (sizeof(char[1-2*(!RUBY_VERSION_isdigit(removal[0]) || RUBY_VERSION_SINCE(removal) )])!=1 ? \
86
87
rb_deprecated_method_to_be_removed(removal) : \
87
88
RBIMPL_ASSERT_NOTHING)
88
89
# endif
You can’t perform that action at this time.
0 commit comments