- 12 Oct, 2020 40 commits
-
-
Yukihiro "Matz" Matsumoto authored
Implements `catch`/`throw` non-local jump inherited from Lisp. `catch([tag]) {|tag| block } -> obj` Example: ``` catch(:foo) { 123 } # => 123 catch(:foo) { throw(:foo, 456) } # => 456 catch(:foo) { throw(:foo) } # => nil ```
-
Yukihiro "Matz" Matsumoto authored
From human readable (ASCII) string representation to binary dump of IEEE754 in little endian.
-
Yukihiro "Matz" Matsumoto authored
They are basically the copy of instance variable tables. On my Linux box, memory consumption of `mrbtest` measured by `valgrind` is: - old: 17,683,830 bytes - new: 14,283,749 bytes
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
It uses `mrb_str_new_lit()` internally, but it doesn't need to express it in the name of the function (macro).
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
Where fixnum overflow can happen.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
`sizeof(rand_state)` had been bigger than `sizeof(void*)*3`. Changed random number generator to `Xorshift96` on 32 bit platforms.
-
Yukihiro "Matz" Matsumoto authored
- Integrate `Fixnum` and `Integer` - Remove `Integral` - `int / int -> int` - Replace `mrb_fixnum()` to `mrb_int()` - Replace `mrb_fixnum_value()` to `mrb_int_value()`. - Use `mrb_integer_p()` instead of `mrb_fixnum_p()`
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
So that you can omit `host` target. Now `host-debug` works.
-
Yukihiro "Matz" Matsumoto authored
Based on cremno/mruby@6bd0119
-
Yukihiro "Matz" Matsumoto authored
They used to return `mrb_value` but now return `mrb_sym` for consistency with other `intern` functions. If symbols are not defined, `check` functions return `0`, instead of `nil` in the past. It causes API incompatibility but I believe few people use those functions out of the core, and those changes are very easy to handle, hopefully.
-
Yukihiro "Matz" Matsumoto authored
We call `mrb_intern_str()` later anyway, so there's no need to avoid defining a new symbol here.
-
Yukihiro "Matz" Matsumoto authored
Based on cremno/mruby@d446192
-
Yukihiro "Matz" Matsumoto authored
They are not used from the beginning.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
As described in ISO 15.2.30.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
We still have `#define MRB_TT_FIXNUM MRB_TT_INTEGER` for compatibility.
-
cremno authored
-
cremno authored
-
cremno authored
Also remove some unnecessary code.
-
-
KOBAYASHI Shuji authored
Trailing `.0` is removed from `Float#to_s` and `Float#inspect` at 9d08025b. However, I think the more human-readable format is better for `Float#inspect`. For example, in the `Float#to_s` format, the failure message is not well understood when testing values including types by `eql?` (e.g. `Numeric#step` test). ```ruby assert "example" do exp = 1.0 act = 1 assert_operator(exp, :eql?, act) #=> Expected 1 to be eql? 1. end ```
-
Yukihiro "Matz" Matsumoto authored
-
dearblue authored
* The `Fixnum` constant is now an alias for the `Integer` class. * Remove `struct mrb_state::fixnum_class` member. If necessary, use `struct mrb_state::integer_class` instead.
-
KOBAYASHI Shuji authored
```console $ bin/mruby -e 'p({1 => 2}.key?(1.0))' true ``` ```console $ bin/mruby -e 'p({1 => 2}.key?(1.0))' false ```
-
Yukihiro "Matz" Matsumoto authored
close #3123
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-
Lanza authored
-
Yukihiro "Matz" Matsumoto authored
TODO: Unlike CRuby, mruby's `Proc#parameters` does not distinguish required keyword arguments and optional keyword arguments currently.
-
Yukihiro "Matz" Matsumoto authored
-
Yukihiro "Matz" Matsumoto authored
-