summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-kernel-ext
AgeCommit message (Collapse)Author
2020-06-20Add `mrb_get_arg1()` that retrieves single (and only) argument.Yukihiro "Matz" Matsumoto
`mrb_get_arg1()` raises `ArgumentError` if the method does not receive one argument. And replaces all `mrb_get_args(mrb, "o", &arg)` by the new function.
2020-01-06Fix `mrb_str_len_to_dbl` to support Hexadecimal like `0x10`.Yukihiro "Matz" Matsumoto
2019-12-11Fix behavior of `Kernel#Integer` to numbers ending with `_` and spacesKOBAYASHI Shuji
#### Before this patch: ```ruby Integer("1_ ") #=> 1 ``` #### After this patch (same as Ruby): ```ruby Integer("1_ ") #=> ArgumentError ```
2019-12-10Fix behavior of `String#to_i`/`Kernel#Integer` to numbers starting with `_`KOBAYASHI Shuji
#### Before this patch: ```ruby Integer("_1") #=> 1 "_1".to_i #=> 1 ``` #### After this patch (same as Ruby): ```ruby Integer("_1") #=> ArgumentError "_1".to_i #=> 0 ```
2019-12-09Fix that `String#to_f` accepts consecutive `_` as a numeric expressionKOBAYASHI Shuji
Consecutive `_` is not allowed as a numeric expression: 1_2__3 #=> SyntaxError Float("1_2__3") #=> ArgumentError Integer("1_2__3") #=> ArgumentError "1_2__3".to_i #=> 12 But `String#to_f` accept it, so I fixed the issue. Before this patch: "1_2__3".to_f #=> 123 After this patch: "1_2__3".to_f #=> 12
2019-11-15Fix argument specs to `Kernel`KOBAYASHI Shuji
2019-09-26Use type predicate macros instead of `mrb_type` if possibleKOBAYASHI Shuji
For efficiency with `MRB_WORD_BOXING` (implement type predicate macros for all `enum mrb_vtype`).
2019-08-05Use new specifiers/modifiers of `mrb_vfromat()`KOBAYASHI Shuji
The binary sizes (gems are only `mruby-bin-mruby`) are reduced slightly in my environment than before the introduction of new specifiers/modifiers (5116789a) with this change. ------------+-------------------+-------------------+-------- BINARY | BEFORE (5116789a) | AFTER (This PR) | RATIO ------------+-------------------+-------------------+-------- mruby | 593416 bytes | 593208 bytes | -0.04% libmruby.a | 769048 bytes | 767264 bytes | -0.23% ------------+-------------------+-------------------+-------- BTW, I accidentally changed `tasks/toolchains/visualcpp.rake` at #4613, so I put it back.
2019-06-06Clarify `mruby-(kernel|object)-ext` gem summary; ref 8e637bdd [ci skip]KOBAYASHI Shuji
2019-05-25Name the return value of `mrb_range_beg_len()`dearblue
2019-05-19Should clarify the role of `mruby-kernel-ext` and `mruby-object-ext`; close ↵Yukihiro "Matz" Matsumoto
#4449 The former should contain function like methods, and the latter should contain methods shared by all objects.
2019-05-08Use `mrb_string_value_cstr` in `mrb_str_to_dbl`KOBAYASHI Shuji
2019-01-03Remove `Kernel#class_defined?` which is not available in CRuby; #3829Yukihiro "Matz" Matsumoto
2018-11-19Removed `to_hash` conversion method.Yukihiro "Matz" Matsumoto
2018-11-19Removed `to_ary` conversion method.Yukihiro "Matz" Matsumoto
2018-11-19Remove implicit conversion using `to_str` method; fix #3854Yukihiro "Matz" Matsumoto
We have added internal convenience method `__to_str` which does string type check. The issue #3854 was fixed but fundamental flaw of lack of stack depth check along with fibers still remains. Use `MRB_GC_FIXED_ARENA` for workaround.
2018-11-19Remove implicit conversion using `to_int` method.Yukihiro "Matz" Matsumoto
The ISO standard does not include implicit type conversion using `to_int`. This implicit conversion often causes vulnerability. There will be no more attacks like #4120. In addition, we have added internal convenience method `__to_int` which does type check and conversion (from floats).
2018-05-23Add `then` alias to `yield_self`.Yukihiro "Matz" Matsumoto
`then' was added in CRuby 2.6.
2017-11-04Merge branch 'master' of github.com:mruby/mrubyYAMAMOTO Masaya
2017-10-18Add `Kernel#itself`; CRuby2.2Yukihiro "Matz" Matsumoto
2017-10-17Add `Kernel#yield_self`; CRuby2.5Yukihiro "Matz" Matsumoto
2017-10-16Support MRB_WIHTOUT_FLOAT to mruby-kernel-extYAMAMOTO Masaya
2017-05-23Remove class info from backtrace lines.Yukihiro "Matz" Matsumoto
2017-03-25Fix lost linenoksss
2017-02-12Fixed aspec for Kernel#callerTomasz Dabrowski
2017-01-23Changed the behavior of mrb_range_beg_len(); close #3411Yukihiro "Matz" Matsumoto
The new API is: int mrb_range_beg_len(mrb, range, &beg, &len, len, trunc) The new argument `trunc` is a boolean value that specifies whether the function truncates the range. The new return value is an integer instead of a boolean, that is: 0: not a range 1: range with proper edges 2: out of range To get the old behavior, you have to rewrite: mrb_range_beg_len(mrb, range, &beg, &len, len) to: mrn_range_beg_len(mrb, range, &beg, &len, len, TRUE) == 1 [Breaking Change]
2017-01-14Skip when backtrace doesn't getksss
2017-01-14Implement Kernel.#callerksss
2016-09-28Removed trailing spacesNobuyoshi Nakada
2016-01-14Add tests which passes all zero string to Kernel#IntegerSyohei YOSHIDA
2015-11-27include changed from by quotes ("") to by brackets (<>); close #3032Yukihiro "Matz" Matsumoto
2015-10-21Revert "Mark core gems with mrbgem tag"Seba Gamboa
This reverts commit 5cdcce8dbddd94ecb9503a0a1d47370c4ef97177.
2015-10-20Remove obvious warnings from docsSeba Gamboa
2015-10-20Mark core gems with mrbgem tagSeba Gamboa
2015-06-28Rename extended xxxx class or module to xxxx class or module extensionJun Hiroe
2015-06-28Fix typo; Replace extensional with extendedJun Hiroe
2014-10-29use mrb_get_args to parse Integer() option; ref #2625Yukihiro "Matz" Matsumoto
2014-10-29Add Kernel.IntegerJun Hiroe
2014-10-24Add Kernel.FloatJun Hiroe
2014-10-21Add Kernel.HashJun Hiroe
2014-10-20Add Kernel.StringJun Hiroe
2014-10-19Refactor mrb_f_array funcJun Hiroe
2014-10-19refactoring C part of #2611Yukihiro "Matz" Matsumoto
2014-10-19Add Kernel.ArrayJun Hiroe
2014-06-05update Kernel#raise/fail argument descriptionYukihiro "Matz" Matsumoto
2014-05-09Move `__method__` to mruby-kernel-ext since it's not ISO method.take_cheeze
2014-05-08Replace from include <>, to include "".yui-knk
2014-05-07Move Kernel#fail definition to mruby-kernel-ext mrbgem.take_cheeze