Yukihiro "Matz" Matsumoto
752edf413f
Terminate float right shift if shift value is too big.
2019-05-16 09:51:27 +09:00
Yukihiro "Matz" Matsumoto
6af0effda1
Merge pull request #4435 from shuujii/fix-typo-in-mrbgems-mruby-io-src-file_test.c
...
Fix typo in `mrbgems/mruby-io/src/file_test.c` [ci skip]
2019-05-15 17:00:46 +09:00
Yukihiro "Matz" Matsumoto
936f72fdd2
Do not overwrite conf.cc.defines.
2019-05-15 16:58:35 +09:00
Ukrainskiy Sergey
31bfc55866
Fix
2019-05-15 16:57:21 +09:00
Ukrainskiy Sergey
fa45cc4272
Fix dependencies
2019-05-15 16:57:21 +09:00
Ukrainskiy Sergey
d67d2ae8e8
Basic implementation of Complex and Rational classes
2019-05-15 16:57:21 +09:00
Ukrainskiy Sergey
79c3335e8d
Small refactoring
2019-05-15 16:57:21 +09:00
Ukrainskiy Sergey
8808219e6d
Initial suffix support
2019-05-15 16:57:21 +09:00
KOBAYASHI Shuji
5f664fb6f8
Fix typo in mrbgems/mruby-io/src/file_test.c [ci skip]
2019-05-15 16:27:08 +09:00
Yukihiro "Matz" Matsumoto
7f1f499b22
Merge pull request #4400 from shuujii/fix-name-assignment-to-frozen-anonymous-class-module
...
Fix name assignment to frozen anonymous class/module
2019-05-15 15:47:02 +09:00
Yukihiro "Matz" Matsumoto
780342eddb
Add Enumerator support to String#each_byte.
...
`String#each_byte` is not defined in ISO Ruby but it is implemented in
the core mruby because it's useful.
2019-05-15 14:59:48 +09:00
Yukihiro "Matz" Matsumoto
138845a519
Merge pull request #4434 from shuujii/refine-Time-to_s-inspect
...
Refine `Time#(to_s|inspect)`
2019-05-15 14:22:47 +09:00
Yukihiro "Matz" Matsumoto
fd37bc53de
Remove String#=~ and String#match that requires Regexp.
2019-05-15 09:55:21 +09:00
KOBAYASHI Shuji
edf4b33c61
Refine Time#(to_s|inspect)
...
For the following reasons:
- Ruby compatibility.
- Add UTC offset (time zone informations was not included by #4433 ).
- More readable.
Example:
Before this patch:
p Time.gm(2003,4,5,6,7,8,9) #=> Sat Apr 5 06:07:08 2003
p Time.local(2013,10,28,16,27,48) #=> Mon Oct 28 16:27:48 2013
After this patch:
p Time.gm(2003,4,5,6,7,8,9) #=> 2003-04-05 06:07:08 UTC
p Time.local(2013,10,28,16,27,48) #=> 2013-10-28 16:27:48 +0900
Implementation:
I use `strftime(3)` because UTC offset can be added and program size become
smaller than the other implementations (using `sprintf(3)`, self conversion
etc) in my environment.
2019-05-14 22:50:36 +09:00
Yukihiro "Matz" Matsumoto
d8eff635fd
Merge pull request #4433 from shuujii/fix-Time-asctime-ctime-according-to-ISO-Ruby
...
Fix `Time#(asctime|ctime)` according to ISO Ruby
2019-05-14 18:36:55 +09:00
KOBAYASHI Shuji
a2616db4dc
Fix Time#(asctime|ctime) according to ISO Ruby
...
- A leading charactor for day is space.
- Time zone does not included.
Before this patch:
Time.gm(1982,3,4,5,6,7).asctime #=> "Thu Mar 04 05:06:07 UTC 1982"
After this patch:
Time.gm(1982,3,4,5,6,7).asctime #=> "Thu Mar 4 05:06:07 1982"
2019-05-13 19:46:26 +09:00
Yukihiro "Matz" Matsumoto
b145ed9de5
Merge pull request #4432 from shuujii/fix-missing-assertions-in-mruby-time-test
...
Fix missing assertions in `mruby-time` test
2019-05-13 08:33:55 +09:00
KOBAYASHI Shuji
2c2584138a
Fix missing assertions in mruby-time test
2019-05-12 20:25:11 +09:00
Yukihiro "Matz" Matsumoto
e28ebed661
Merge pull request #4431 from shuujii/use-mrb_ensure_string_type-in-mrb_to_str
...
Use `mrb_ensure_string_type` in `mrb_to_str`
2019-05-12 14:33:10 +09:00
KOBAYASHI Shuji
fa317fabbd
Use mrb_ensure_string_type in mrb_to_str
2019-05-11 18:40:33 +09:00
Yukihiro "Matz" Matsumoto
4cce39cab7
Merge pull request #4430 from bshastry/ossfuzz
...
Update ossfuzz options
2019-05-11 09:26:19 +09:00
Yukihiro "Matz" Matsumoto
4601ac7f13
Merge pull request #4429 from shuujii/move-mrb_gc_arena_restore-into-loop-in-mrb_file_s_chmod
...
Move `mrb_gc_arena_restore` to inside the loop in `mrb_file_s_chmod`
2019-05-11 09:24:35 +09:00
Bhargava Shastry
1e2983bd04
Update ossfuzz options
2019-05-10 16:13:05 +02:00
KOBAYASHI Shuji
f2719e903a
Move mrb_gc_arena_restore to inside the loop in mrb_file_s_chmod
2019-05-10 21:10:44 +09:00
Yukihiro "Matz" Matsumoto
2e99f34fe3
Merge pull request #4428 from shuujii/raise-TypeError-if-the-argument-type-is-unsupported-in-mrb_stat0
...
Raise `TypeError` if the argument type is unsupported in `mrb_stat0`
2019-05-10 12:25:10 +09:00
KOBAYASHI Shuji
0d94a2e3a9
Raise TypeError if the argument type is unsupported in mrb_stat0
2019-05-10 00:31:30 +09:00
Yukihiro "Matz" Matsumoto
9a4f3029d9
Update README.md; mruby is now Ruby 2.x compatible.
2019-05-08 21:32:25 +09:00
Yukihiro "Matz" Matsumoto
ecc6eb81b5
Merge pull request #4426 from shuujii/use-mrb_string_value_cstr-in-mrb_str_to_dbl
...
Use `mrb_string_value_cstr` in `mrb_str_to_dbl`
2019-05-08 21:32:11 +09:00
KOBAYASHI Shuji
1975dedb21
Use mrb_string_value_cstr in mrb_str_to_dbl
2019-05-08 20:35:03 +09:00
Yukihiro "Matz" Matsumoto
f405d35dac
Merge pull request #4425 from shuujii/refactor-mrb_str_to_cstr-and-mrb_string_value_cstr
...
Refactor `mrb_str_to_cstr` and `mrb_string_value_cstr`
2019-05-08 06:23:50 +09:00
KOBAYASHI Shuji
35943e7beb
Refactor mrb_str_to_cstr and mrb_string_value_cstr
...
- 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-07 23:01:13 +09:00
Yukihiro "Matz" Matsumoto
c778c234b0
Merge pull request #4424 from shuujii/avoid-using-mrb_str_to_cstr-if-possible
...
Avoid using `mrb_str_to_cstr` if possible
2019-05-07 06:21:10 +09:00
KOBAYASHI Shuji
e2604c1550
Avoid using mrb_str_to_cstr if possible
...
Because it always allocate new string. Replace with the followings:
- Use `RSRING_PTR` if string is guaranteed to be null-terminated.
- Use `mrb_string_value_cstr` or `mrb_get_args("z")` if return value isn't
modified.
2019-05-06 23:32:53 +09:00
Yukihiro "Matz" Matsumoto
31cc8573f0
Merge pull request #4423 from shuujii/use-mrb_fixnum_to_str-instead-of-Fixnum-to_s
...
Use `mrb_fixnum_to_str()` instead of `Fixnum#to_s`
2019-05-05 21:57:35 +09:00
KOBAYASHI Shuji
0ccb058b90
Use mrb_fixnum_to_str() instead of Fixnum#to_s
2019-05-05 20:31:12 +09:00
Yukihiro "Matz" Matsumoto
2b1c4e9acd
Merge pull request #4179 from bshastry/ossfuzz
...
ossfuzz: Add simple mruby compile test harness
2019-05-04 18:32:40 +09:00
Yukihiro "Matz" Matsumoto
82b04f927e
Merge pull request #4422 from shuujii/check-whether-object-is-immediate-in-mrb_gc_register-unregister
...
Check whether object is immediate in `mrb_gc_(register|unregister)`
2019-05-04 18:28:06 +09:00
KOBAYASHI Shuji
a5bda13fb7
Check whether object is immediate in mrb_gc_(register|unregister)
2019-05-04 16:38:07 +09:00
Yukihiro "Matz" Matsumoto
181d14668a
Merge pull request #4420 from shuujii/simplify-conversion-process-for-i-in-mrb_get_args
...
Simplify conversion process for `i` in `mrb_get_args()`
2019-05-04 00:19:14 +09:00
Yukihiro "Matz" Matsumoto
187b4c819f
Merge pull request #4419 from dearblue/fix-always-static
...
Fix `FLAG_SRC_STATIC` always set in `mrb_read_irep()` with `MRB_USE_CUSTOM_RO_DATA_P`
2019-05-04 00:17:10 +09:00
Yukihiro "Matz" Matsumoto
a277a6e47d
Merge pull request #4418 from dearblue/clean-duplicate
...
Clean duplicate code
2019-05-04 00:15:56 +09:00
KOBAYASHI Shuji
0692f7916c
Simplify conversion process for i in mrb_get_args()
2019-05-03 13:39:19 +09:00
dearblue
e86e360b36
Fix FLAG_SRC_STATIC always set in mrb_read_irep() with MRB_USE_CUSTOM_RO_DATA_P
2019-05-03 11:42:14 +09:00
dearblue
f5d5caaf82
Clean duplicate code
...
Removed duplicates in the code entered for "Concatenate string literal".
2019-05-03 11:36:31 +09:00
Yukihiro "Matz" Matsumoto
8c8e6e25ad
Merge pull request #4417 from shuujii/unify-overflow-error-class-for-conversion-to-integer-to-RangeError
...
Unify overflow error class for conversion to integer to `RangeError`
2019-05-02 23:05:13 +09:00
Yukihiro "Matz" Matsumoto
35319bed01
Use a normal method instead of a lambda in bintest/mruby; ref #4416
2019-05-02 23:03:38 +09:00
Yukihiro "Matz" Matsumoto
f83112cea2
Fixed include specifier format for mruby/common.h.
2019-05-02 22:55:19 +09:00
Yukihiro "Matz" Matsumoto
335602e85c
Merge pull request #4416 from shuujii/small-fix-in-mruby-bin-mruby
...
Small fix in `mruby-bin-mruby`
2019-05-02 22:52:38 +09:00
Yukihiro "Matz" Matsumoto
a7871ce77e
Merge pull request #4415 from shuujii/remove-unneeded-argc-check-in-mrb_str_aref_m
...
Remove unneeded `argc` check in `mrb_str_aref_m()`
2019-05-02 22:31:58 +09:00
KOBAYASHI Shuji
95a92d35c8
Unify overflow error class for conversion to integer to RangeError
2019-05-02 20:45:31 +09:00