`rb_eval_string_wrap` says that it "evaluates the given string under a module binding in an isolated binding", but this isn't true. Run the following: ~~~ #include <ruby.h> int main(int argc, char* argv[]) { ruby_init(); ...silverhammermba (Max Anselm)
Well I can't get it to work for some reason. When I run this code: ~~~C #include <ruby.h> VALUE func(VALUE arg) { VALUE str = rb_sprintf("%i %+i : %d %+d", Qtrue, Qtrue, Qtrue, Qtrue); rb_funcall(rb_mKernel, rb_intern("puts")...silverhammermba (Max Anselm)
I would expect it to raise `RangeError` if the num exceeds the size of a `char`. That is the behavior of the all of the other `NUM2*` macros.silverhammermba (Max Anselm)
README.EXT claims: > In the format string, `%i` is used for `Object#to_s` (or `Object#inspect` if ‘+’ flag is set) output (and related argument must be a VALUE). But if you look at the code, this isn't true. %d and %i are handled t...silverhammermba (Max Anselm)
`NUM2CHR()` just calls `rb_num2int_inline()` and masks off the high bytes. Consequently, passing any value larger than a `char` and no bigger than an `int` will return some garbage value (rather than raising `RangeError`). To reproduc...silverhammermba (Max Anselm)
Sorry for the unclear wording. I would expect that it behaves similar to `DateTime`'s implementation and to not ignore any fields returned by `Date._strptime`. At the very least the documentation should reflect the fact that it will only...silverhammermba (Max Anselm)
According to the documentation, `Time.strptime` "parses +date+ using `Date._strptime` and converts it to a Time object." However this conversion is extremely naive, using only certain fields return by `Date._strptime` and ignoring the re...silverhammermba (Max Anselm)
The output of the profile lib seems to be partially dependent on how it is required. For example, ~~~ ruby -rprofile -e '0==1' ~~~ shows one call to Fixnum#== as expected ~~~ ruby -e 'require "profile"; 0==1' ~~~ does not sho...silverhammermba (Max Anselm)