summaryrefslogtreecommitdiffhomepage
path: root/src
AgeCommit message (Collapse)Author
2019-06-07Remove `Kernel#global_variables` from coreKOBAYASHI Shuji
This method is defined in `mruby-metaprog` gem.
2019-05-30Fix inverted compilation condition; fix #4478Yukihiro "Matz" Matsumoto
2019-05-29Add `mrb_alloca` again; ref #4470Yukihiro "Matz" Matsumoto
This time, the allocated memory comes from the string object, which is referenced from GC arena. The memory region will be reclaimed when the C function called from VM is terminated, or the GC arena is restored.
2019-05-27Merge pull request #4470 from dearblue/remove-mrb_allocaYukihiro "Matz" Matsumoto
Remove `mrb_alloca()` function
2019-05-26Move `mrb_mod_s_nesting()` to `mruby-metaprog` gem from the coreKOBAYASHI Shuji
2019-05-25Remove `mrb_alloca()` functiondearblue
When I found this function, I expected it to behave the same as the `alloca(3)` function, but it is accually the `mrb_alloca()` function does not free the heap until the `mrb_close()` function is called. Also, even if it is deleted, it can be replaced with the combination of the `MRB_TT_DATA` object and the `mrb_gv_set()` function if it is sure necessary.
2019-05-25Fix double rounded by negative indexdearblue
- Before patched: ``` $ mruby -e 'p (-12..-1).map { |i| "Hello"[i] }.join' "HelloHello" ``` - After patched: ``` $ mruby -e 'p (-12..-1).map { |i| "Hello"[i] }.join' "Hello" ```
2019-05-25Name the return value of `mrb_range_beg_len()`dearblue
2019-05-22Merge pull request #4403 from dearblue/read-irep-from-bufYukihiro "Matz" Matsumoto
Read irep from buffers
2019-05-21Update ISO section number for some Numeric methods.Yukihiro "Matz" Matsumoto
2019-05-21Export `mrb_int_value` that converts `mrb_float` to `Fixnum`.Yukihiro "Matz" Matsumoto
Or `Float` if `mrb_float` value is too big (or too small) to fit in `mrb_int`. The `_int_` in `mrb_int_value` means `Integral` module, which represents integer-like values in mruby.
2019-05-21Silence the return value warnings from gcc; ref 237a57bYukihiro "Matz" Matsumoto
2019-05-21Move `**`,`/`,`quo`,`div` and comparison methods to Integral from NumericKOBAYASHI Shuji
Having these methods in Numeric can get in the way of creating subclasses of Numeric because they only support Fixnum and Float.
2019-05-20Add new functions for numerical operation; ref 237a57bYukihiro "Matz" Matsumoto
New functions: * mrb_num_plus(mrb, x, y) * mrb_num_minus(mrb, x, y) * num_num_mul(mrb, x, y)
2019-05-19Merge pull request #4455 from dearblue/remove-LINE-sectionYukihiro "Matz" Matsumoto
Remove "LINE" section reader
2019-05-19Remove "LINE" section readerdearblue
Because it is not currently output by `mrbc`.
2019-05-18Move `Kernel#equal? to `BasicObject`KOBAYASHI Shuji
2019-05-18Move `Numeric#__coerce_step_counter` to `Integral`KOBAYASHI Shuji
This method is only used in `Integral#step`
2019-05-18Add ISO section number to `Module#===`.Yukihiro "Matz" Matsumoto
2019-05-18Rename `struct RIstruct` to `struct RIStruct`.Yukihiro "Matz" Matsumoto
2019-05-17Make unused functions private.Yukihiro "Matz" Matsumoto
* mrb_fixnum_plus() * mrb_fixnum_minus() * mrb_fixnum_mul()
2019-05-17Remove unused `mrb_num_div()` function.Yukihiro "Matz" Matsumoto
2019-05-17Move `Numeric#div` to the core.Yukihiro "Matz" Matsumoto
2019-05-17Make `flo_rount` to return `Integeral`.Yukihiro "Matz" Matsumoto
2019-05-17Change the `num.divmod(float)` to return `[int,num]`.Yukihiro "Matz" Matsumoto
2019-05-17Add a new function `mrb_int_value`.Yukihiro "Matz" Matsumoto
This function returns `Fixnum` if the value fits in `mrb_int`, otherwise it returns `Float` value (mruby behavior of handling integers).
2019-05-17Use `int64_t` instead of `mrb_int` in `int64_value`.Yukihiro "Matz" Matsumoto
2019-05-16Terminate float right shift if shift value is too big.Yukihiro "Matz" Matsumoto
2019-05-15Merge pull request #4400 from ↵Yukihiro "Matz" Matsumoto
shuujii/fix-name-assignment-to-frozen-anonymous-class-module Fix name assignment to frozen anonymous class/module
2019-05-11Use `mrb_ensure_string_type` in `mrb_to_str`KOBAYASHI Shuji
2019-05-08Use `mrb_string_value_cstr` in `mrb_str_to_dbl`KOBAYASHI Shuji
2019-05-07Refactor `mrb_str_to_cstr` and `mrb_string_value_cstr`KOBAYASHI Shuji
- Extract null byte check to function. - Avoid string allocation if null byte is included. - Use `str_new` instead of `mrb_str_dup` + `mrb_str_modify`
2019-05-04Check whether object is immediate in `mrb_gc_(register|unregister)`KOBAYASHI Shuji
2019-05-04Merge pull request #4420 from ↵Yukihiro "Matz" Matsumoto
shuujii/simplify-conversion-process-for-i-in-mrb_get_args Simplify conversion process for `i` in `mrb_get_args()`
2019-05-03Simplify conversion process for `i` in `mrb_get_args()`KOBAYASHI Shuji
2019-05-03Fix `FLAG_SRC_STATIC` always set in `mrb_read_irep()` with ↵dearblue
`MRB_USE_CUSTOM_RO_DATA_P`
2019-05-02Merge pull request #4417 from ↵Yukihiro "Matz" Matsumoto
shuujii/unify-overflow-error-class-for-conversion-to-integer-to-RangeError Unify overflow error class for conversion to integer to `RangeError`
2019-05-02Unify overflow error class for conversion to integer to `RangeError`KOBAYASHI Shuji
2019-05-01Remove unneeded `argc` check in `mrb_str_aref_m()`KOBAYASHI Shuji
2019-04-25Singleton class of frozen object should be frozenKOBAYASHI Shuji
Before this patch: p (class << Object.new.freeze; self end).frozen? #=> false sc = class << (o=Object.new); self end; o.freeze; p sc.frozen? #=> false After this patch / Ruby: p (class << Object.new.freeze; self end).frozen? #=> true sc = class << (o=Object.new); self end; o.freeze; p sc.frozen? #=> true
2019-04-24Add mruby binary loader functions from buffer memorydearblue
Add new functions (with `MRB_API`): - `mrb_read_irep_buf()` - `mrb_load_irep_buf()` - `mrb_load_irep_buf_cxt()`
2019-04-24Check mruby binary sizedearblue
2019-04-24Check mruby binary versiondearblue
2019-04-24Fix modiying class variable to frozen class/moduleKOBAYASHI Shuji
2019-04-24Remove unnecessary `mrb_regexp_check()` and related functions.Yukihiro "Matz" Matsumoto
2019-04-23Fix name assignment to frozen anonymous class/moduleKOBAYASHI Shuji
Fix the following issues: A = Class.new.freeze #=> FrozenError Module.new::B = Class.new.freeze #=> FrozenError String::B = Module.new.freeze #=> FrozenError
2019-04-23Fixed the condition in `mrb_funcall_with_block`; fix #4389Yukihiro "Matz" Matsumoto
2019-04-22Use `MRB_ASPEC_XXX()` macro in `codedump()`KOBAYASHI Shuji
2019-04-16Fixed a bug in recursive `mrb_top_run` calls; fix #4384Yukihiro "Matz" Matsumoto
2019-04-15Fixed wrong function names; fix #4380Yukihiro "Matz" Matsumoto