rubinius/rubinius — pull request #1791 by ryoqun (2012-07-02 12:30:38+00:00)
Title: Correctly spec rb_str_new_cstr as 1.9-only CAPI

Currently, rb_str_new_cstr is spec'ed as a function available under both 1.8
CAPI and 1.9 CAPI in spec/ruby/optional/capi/ext/rubyspec.h. This is not true.
As a version guard is correctly used in spec/ruby/optional/capi/string_spec.rb,
it is only declared under 1.9 CAPI, not under 1.8 CAPI.

In 1.8 mode, rb_str_new_cstr specs are only compiled, not run, thanks to the
version guard. So, there is no spec failures. However, this commit suppresses
the following warning from clang:

spec/ruby/optional/capi/ext/string_spec.c:165:12: warning:
implicit declaration of function 'rb_str_new_cstr' is invalid in C99
[-Wimplicit-function-declaration]
return rb_str_new_cstr(NULL);
^
1 warning generated.

Also, #undefs aren't needed in spec/ruby/optional/capi/ext/mri.h, because
rb_str_new_cstr is now correctly declared only in 1.9 CAPI.