Yukihiro "Matz" Matsumoto
9145aed85e
bytes2chars() conversion to fail if target byte offset is not on the character boundary; ref #3067
...
that means String#index matches first byte of a multi-byte character. this behavior is different
from CRuby, but a compromise for mruby which does not have encoding stuffs.
2016-01-05 18:05:25 +09:00
Yukihiro "Matz" Matsumoto
aec825a64c
stack_extend before eval_under()
2016-01-04 10:22:38 +09:00
Yukihiro "Matz" Matsumoto
aa1f668b80
instance_eval should pass the receiver as a block parameter; close #3029
2016-01-02 22:01:00 +09:00
Yukihiro "Matz" Matsumoto
879e27d0f1
mirb: enlarge code buffer size to 4KB
2016-01-02 16:58:42 +09:00
Yukihiro "Matz" Matsumoto
bd462c5edc
mruby-fiber: fiber_switch() to use nesting VM when it's called from C API or mrb_funcall(); close #3056
2016-01-02 13:48:45 +09:00
Yukihiro "Matz" Matsumoto
4683b89b84
Merge pull request #3068 from kazuho/kazuho/osx-_setjmp
...
use _setjmp/_longjmp on OS X
2016-01-01 10:15:55 +09:00
Kazuho Oku
121c6e30aa
use _setjmp/_longjmp on other BSD flavors
2016-01-01 06:48:53 +09:00
Kazuho Oku
f4bb329c74
use _setjmp/_longjmp on OS X
2016-01-01 06:24:49 +09:00
Yukihiro "Matz" Matsumoto
38b9c2d308
mruby-fiber: add Fiber.yield description; close #3066
...
Fiber.yield cannot be called from #initialize which is called by
mrb_funcall(). It is mruby limitation.
2015-12-31 21:25:53 +09:00
Yukihiro "Matz" Matsumoto
31b8469bff
Merge pull request #3067 from ksss/use-memchr
...
Use memchr for performance
2015-12-31 21:20:51 +09:00
ksss
6c1b6ef7a5
Use memchr for performance
...
```ruby
s = "b"
str = ("a" * 100 + s)
t = Time.now
str.index(s)
puts Time.now - t
```
before => 0.000788
after => 0.000508
---
```ruby
s = "b"
str = ("a" * 100 * 1024 * 1024 + s)
t = Time.now
str.index(s)
puts Time.now - t
```
before => 0.225474
after => 0.008658
2015-12-31 17:52:22 +09:00
Yukihiro "Matz" Matsumoto
1d7d7062fc
__t_printstr__ may not be available for tests
2015-12-31 00:55:07 +09:00
Yukihiro "Matz" Matsumoto
3531fe179c
GC must scan env from fibers even when it's not yet copied to heap; fix #3063
2015-12-31 00:11:37 +09:00
Yukihiro "Matz" Matsumoto
4fdec33ff4
simpler t_print
2015-12-30 14:25:05 +09:00
Yukihiro "Matz" Matsumoto
ee3fa1be49
Merge pull request #3065 from kou/support-backtrace-after-method-calls
...
Support backtrace after method calls
2015-12-29 23:49:33 +09:00
Kouhei Sutou
0ebac02813
Skip backtrace related tests when backtrace isn't available
2015-12-29 23:26:31 +09:00
Kouhei Sutou
a561bdb25f
Support backtrace after method calls
...
GitHub: fix #2902 , #2917
The current implementation traverses stack to retrieve backtrace. But
stack will be changed when some operations are occurred. It means that
backtrace may be broken after some operations.
This change (1) saves the minimum information to retrieve backtrace when
exception is raised and (2) restores backtrace from the minimum
information when backtrace is needed. It reduces overhead for creating
backtrace Ruby objects.
The space for the minimum information is reused by multiple
exceptions. So memory allocation isn't occurred for each exception.
2015-12-29 20:36:12 +09:00
Yukihiro "Matz" Matsumoto
e132de9e8e
Merge pull request #3064 from kou/fix-indent
...
Fix indent
2015-12-29 14:25:10 +09:00
Kouhei Sutou
1eeeecb08a
Fix indent
2015-12-29 14:20:10 +09:00
Yukihiro "Matz" Matsumoto
d3c6fafaf3
Merge pull request #2331 from take-cheeze/struct_test
...
Improve `Struct` test.
2015-12-26 15:46:49 +09:00
Yukihiro "Matz" Matsumoto
825ced12de
remove duplicated local variable declaration
2015-12-26 11:23:28 +09:00
Yukihiro "Matz" Matsumoto
d10e304d79
Merge pull request #3062 from suzukaze/refactor-array-each
...
Refactor Array#each
2015-12-26 10:49:20 +09:00
Yukihiro "Matz" Matsumoto
6218b2e098
Merge pull request #3061 from mattn/fix-ctrl-c
...
mirb: Don't exit on Ctrl-C
2015-12-26 10:28:50 +09:00
Jun Hiroe
88076901fd
Refactor Array#each
2015-12-26 10:12:01 +09:00
kyab
1e34b12a02
mirb: Don't exit on Ctrl-C
2015-12-26 10:03:28 +09:00
Yukihiro "Matz" Matsumoto
76d44b1b48
remove execute bit from mrbgems/mruby-bin-debugger files
2015-12-26 00:07:16 +09:00
Yukihiro "Matz" Matsumoto
6e09abceaf
Merge pull request #3058 from mattn/fix-include-blocker
...
rename include blocker
2015-12-26 00:04:24 +09:00
Yasuhiro Matsumoto
f0205e1182
rename include blocker
2015-12-25 13:43:01 +09:00
Yukihiro "Matz" Matsumoto
a060bd5114
Merge pull request #3057 from yuuu/add_next_command
...
mrdb: Added 'next' command.
2015-12-23 22:35:48 +09:00
Yuhei Okazaki
887a56ba80
fix bug that doesn't stop program when execute next command.
2015-12-23 22:16:36 +09:00
Yuhei Okazaki
a08439a7c0
fixed next command's comment.
2015-12-23 22:16:36 +09:00
Yuhei Okazaki
e1cc814ec4
add next command to mrdb.
2015-12-23 22:16:36 +09:00
Yukihiro "Matz" Matsumoto
7e4a7abf5f
Merge pull request #3055 from mattn/fix-msvc-warnings
...
fix build on VS2012
2015-12-22 18:02:31 +09:00
Yasuhiro Matsumoto
7cc33af2dc
fix build on VS2012
2015-12-22 17:46:20 +09:00
Yukihiro "Matz" Matsumoto
d0727be6eb
Merge pull request #3054 from kazuho/kazuho/adjust-column-offset-in-peekc_n
...
fix miscalculation of column number in `peekc_n`
2015-12-21 18:12:06 +09:00
Kazuho Oku
adadbf5792
in peekc_n, adjust column number after calling nextc
2015-12-21 15:08:56 +09:00
Yukihiro "Matz" Matsumoto
2ca825a212
Merge pull request #3051 from zzak/ambiguous-first-argument
...
Fix "ambiguous first argument" warning
2015-12-17 01:23:34 +09:00
Zachary Scott
3f228c1da4
Fix "ambiguous first argument" warning
2015-12-17 00:12:19 +09:00
Yukihiro "Matz" Matsumoto
0720aac250
Merge pull request #3050 from remore/fix-minor-bug-about-objectspace
...
Add case statement of MRB_TT_SCLASS in mrb_obj_is_kind_of()
2015-12-16 21:04:43 +09:00
Kei Sawada
d69b5c3fc7
Add case statement of MRB_TT_SCLASS in mrb_obj_is_kind_of()
2015-12-16 15:54:03 +09:00
Yukihiro "Matz" Matsumoto
f54a98ff15
mrb_str_len_to_inum(): fixed a bug with MRB_INT_MIN conversion; fix #3048
2015-12-16 14:49:43 +09:00
Yukihiro "Matz" Matsumoto
d18c55fca7
mrb_str_len_to_inum(): fixed a bug with underscores in digits; fix #3049
2015-12-16 14:49:08 +09:00
Yukihiro "Matz" Matsumoto
80c1c60762
Merge pull request #3047 from csouls/rafactor_array_ruby_extension
...
Remove redundant conditions of Array#each in ruby extension
2015-12-16 01:03:20 +09:00
Yusuke Tanaka
d3f59db597
Remove redundant conditions of Array#each in ruby extension
2015-12-15 19:54:29 +09:00
Yukihiro "Matz" Matsumoto
2a234a93d7
mrb_str_len_to_inum(): string may not be NUL terminated; ref #3043
2015-12-14 10:59:56 +09:00
Yukihiro "Matz" Matsumoto
19c744e14d
mrb_str_len_to_inum(): fixed a bug with separating _ in the digits; ref #3043
2015-12-14 10:59:56 +09:00
Yukihiro "Matz" Matsumoto
4a6a11486c
Merge pull request #3045 from Mav7/master
...
Added YARD docs in new mruby.h
2015-12-13 15:49:43 +09:00
Ralph Desir
af33394281
Undid newline and whitespace on YARD doc
2015-12-12 20:21:53 -05:00
Ralph Desir
e27985416f
One space indentation.
2015-12-12 18:28:42 -05:00
Yukihiro "Matz" Matsumoto
26a25e1666
mrb_str_len_to_inum: should not raise "string contains null byte" error on "0x"; fix #3043
2015-12-12 16:33:48 +09:00