| Age | Commit message (Collapse) | Author |
|
conversion from 'mrb_int' to 'int', possible loss of data
|
|
conversion from 'mrb_int' to 'long', possible loss of data
|
|
conversion from 'mrb_int' to 'char', possible loss of data
|
|
According to the naming convention a function that implements
a method should be suffixed by `_m`.
|
|
|
|
Latest fix was freeing the buffer while it was still in use.
Fixes #3712
|
|
|
|
Otherwise the function may terminate and cause memory leaks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the test should pass after https://github.com/mruby/mruby/commit/8f4a929e1a01c8d6176fb53a9ef5dff6de632959.
|
|
|
|
|
|
- String#ljust and String#rjust are now C functions to improve performance
- infinite loop because of an empty padding argument is now prevented (ArgumentError is raised)
- extra tests for ljust/rjust added
|
|
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]
|
|
Fix #3357
|
|
|
|
Prevents RCE
Reported by https://hackerone.com/raydot
|
|
|
|
Reported from from Alex Snaps via Mathieu Leduc-Hamel,
both from shopify.com. Thank you!
|
|
|
|
|
|
Here are some benchmarks:
each_char:
# /tmp/each_char.rb
a = "a" * 1000000
a.each_char do |x|
end
Without this change:
% time bin/mruby /tmp/each_char.rb
bin/mruby /tmp/each_char.rb 1.07s user 0.02s system 99% cpu 1.088 total
With this change:
% time bin/mruby /tmp/each_char.rb
bin/mruby /tmp/each_char.rb 0.52s user 0.01s system 99% cpu 0.530 total
2 times faster with this change.
codepoints:
# /tmp/codepoints.rb
a = "a" * 1000000
a.codepoints do |x|
end
Without this change:
% time bin/mruby /tmp/codepoints.rb
bin/mruby /tmp/codepoints.rb 1.16s user 0.05s system 99% cpu 1.216 total
With this change:
% time bin/mruby /tmp/codepoints.rb
bin/mruby /tmp/codepoints.rb 0.56s user 0.02s system 99% cpu 0.589 total
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define MRB_UTF8_STRING (in mrbconf.h) to enable UTF-8 support.
|
|
|
|
|
|
|
|
|
|
Not needed anymore since 85075bef7583edd0a48cfbdfaa632cbdacf78f2c
|
|
Here are suppressed warnings:
src/fmt_fp.c: In function 'fmt_fp':
src/fmt_fp.c:124:16: warning: initialization discards 'const' qualifier from pointer target type
char *ss = (t&32)?"inf":"INF";
^
src/fmt_fp.c:125:17: warning: assignment discards 'const' qualifier from pointer target type
if (y!=y) ss=(t&32)?"nan":"NAN";
^
mrbgems/mruby-string-ext/src/string.c: In function 'mrb_str_succ_bang':
mrbgems/mruby-string-ext/src/string.c:302:27: warning: assignment discards 'const' qualifier from pointer target type
if (e == b) prepend = "1";
^
mrbgems/mruby-string-ext/src/string.c:305:27: warning: assignment discards 'const' qualifier from pointer target type
if (e == b) prepend = "a";
^
mrbgems/mruby-string-ext/src/string.c:308:27: warning: assignment discards 'const' qualifier from pointer target type
if (e == b) prepend = "A";
^
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c: In function 'main':
mrbgems/mruby-bin-mruby/tools/mruby/mruby.c:213:13: warning: assignment discards 'const' qualifier from pointer target type
cmdline = args.cmdline ? args.cmdline : "-";
^
mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c: In function 'print_breakpoint':
mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:159:3: warning: initialization discards 'const' qualifier from pointer target type
char* enable_letter[] = {BREAK_INFO_MSG_DISABLE, BREAK_INFO_MSG_ENABLE};
^
mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c:159:3: warning: initialization discards 'const' qualifier from pointer target type
|
|
|
|
|
|
|
|
|
|
|
|
|