Commit Graph

2283 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto 28871b9d1f should not over process ensure clauses; close #1949 2014-03-26 17:49:27 +09:00
Yukihiro "Matz" Matsumoto 306b1d3c51 Merge pull request #1948 from monaka/pr-remove-unused-null-check
Remove redundant NULL checks.
2014-03-26 13:32:18 +09:00
Masaki Muranaka dcff9012e3 Remove redundant NULL checks.
mrb_malloc causes an exception when memory was empty.
2014-03-26 11:21:20 +09:00
Yukihiro "Matz" Matsumoto 79ba1ed137 Merge branch 'master' of github.com:mruby/mruby 2014-03-26 01:09:17 +09:00
Yukihiro "Matz" Matsumoto bfd2a539ed add new function mrb_toplevel_run to prevent running through C function boudaries on exceptions; close #1942 2014-03-26 01:09:09 +09:00
ksss c82517862a Fix unnecessary string macro 2014-03-25 23:03:47 +09:00
Yukihiro "Matz" Matsumoto 1e73181da9 Merge pull request #1937 from cubicdaiya/issues/mrb_int
Use mrb_int instead of int
2014-03-25 11:51:23 +09:00
Yukihiro "Matz" Matsumoto a043eb63ca Merge branch 'master' of github.com:mruby/mruby 2014-03-25 11:50:42 +09:00
Yukihiro "Matz" Matsumoto b4dd3564ef REnv uses obj->c as env link; no super 2014-03-25 11:50:11 +09:00
cubicdaiya 6e648d6382 Use mrb_int instead of int 2014-03-25 11:36:47 +09:00
ksss ebf6da7e30 mrb_str_pool add string capa 2014-03-25 08:44:59 +09:00
ksss e6e462c07d src/string.c RESIZE_CAPA use safe name variables
This has a possibility of naming conflicts
2014-03-24 23:05:44 +09:00
chasonr 509cbc51eb Implement \u notation for strings and regexes.
This change adds the \u notation for double quoted strings and regular
expressions.  It does not implement the \u notation for character literals.
Both the \uNNNN and \u{NNNN} notations are supported.

\uNNNN is implemented by emitting equivalent UTF-8; that is, "\u4000" is
equivalent to "\xE4\x80\x80".

Unlike CRuby, the \u{NNNN} notation allows only one character per pair of
braces; I see no way to lift this restriction without remodeling the parser.
2014-03-23 21:46:00 -04:00
ksss b0f10b5c3d mrb_str_pool use embed-string 2014-03-23 08:04:54 +00:00
Yukihiro "Matz" Matsumoto 539d9cb855 need not to add assertion in STR_SET_LEN() where n is mrb_int 2014-03-22 22:33:09 +09:00
Yukihiro "Matz" Matsumoto 5488da6c44 Merge pull request #1907 from ksss/float-round
Float#round fix bug for infinity and nan cases
2014-03-22 16:58:56 +09:00
Yukihiro "Matz" Matsumoto 927bf68769 Merge pull request #1911 from cubicdaiya/issues/use_bool_macro
Use bool-macro instead of magic-number
2014-03-22 16:40:08 +09:00
cubicdaiya 51947f132b Use bool-macro instead of magic-number 2014-03-22 09:55:48 +09:00
take_cheeze f536492521 use FiberError in vm.c 2014-03-22 03:19:58 +09:00
ksss 8891cea41c Float#round fix bug for infinity and nan cases 2014-03-21 22:24:33 +09:00
Keita Obo 3faa76851d Prevent accepting String value for mrb_get_args("i")
Accepting String value for mrb_get_args("i")
causes unintentional expression.

  * `"str" * "3"` => `"strstrstr"`

This change prevents String->Integer conversion for mrb_get_args("i")
and fixes above problem.

See also:
https://github.com/mruby/mruby/issues/1903
2014-03-21 21:41:04 +09:00
Yukihiro "Matz" Matsumoto 2c44f96e78 reduce hash creation by using update method 2014-03-21 09:31:44 +09:00
Yukihiro "Matz" Matsumoto 45b0e1f788 should be able to create hash with 127+ entries; close #1894 2014-03-21 09:18:10 +09:00
Yukihiro "Matz" Matsumoto 36836c8eb9 should restore proc after rescue; close #1891 2014-03-20 16:10:12 +09:00
Yukihiro "Matz" Matsumoto 72c274473b remove size_t cast in mrb_assert() since ((size_t)n <= SIZE_MAX) is always true 2014-03-19 09:07:59 +09:00
Yukihiro "Matz" Matsumoto 9084e03556 rename mrb_yield_internal to mrb_yield_with_class since it's no longer internal 2014-03-19 08:57:54 +09:00
Tomoyuki Sahara 93694fe521 export mrb_yield_internal. 2014-03-19 01:08:01 +09:00
Yukihiro "Matz" Matsumoto 792c1add0c string functions arguments changed from mrb_int to size_t that would take strlen() 2014-03-19 00:46:27 +09:00
Yukihiro "Matz" Matsumoto 180b3d5678 change mrb_int to size_t that would take strlen() 2014-03-19 00:17:03 +09:00
Yukihiro "Matz" Matsumoto 3e24e06b29 add a space after C reserved words 2014-03-18 23:57:29 +09:00
Yukihiro "Matz" Matsumoto 4893a1f431 Merge pull request #1884 from monaka/pr-reduce-implicit-type-cast
Reduce implicit type casts.
2014-03-18 22:18:57 +09:00
Masaki Muranaka 1df355e300 Reduce implicit type casts. 2014-03-18 17:36:47 +09:00
Yukihiro "Matz" Matsumoto 9201af7d36 mark root fiber object; close #1865 2014-03-18 12:39:11 +09:00
Yukihiro "Matz" Matsumoto d53423fb7d Merge pull request #1870 from ksss/convert_type
fix bool number to macro
2014-03-17 00:15:01 +09:00
Yukihiro "Matz" Matsumoto e4ae3bf661 Merge pull request #1871 from ksss/numeric-plus
fix bug when `0 + other object`
2014-03-17 00:14:42 +09:00
Yukihiro "Matz" Matsumoto 5140e27b5a Merge pull request #1872 from ksss/numeric-mul
fix bug when `0 * other object`
2014-03-17 00:14:16 +09:00
ksss 0fab9d557e float + nil should be raise TypeError 2014-03-16 23:39:58 +09:00
ksss 9dcce29749 fix bug when 0 * other object 2014-03-16 23:08:31 +09:00
ksss e9f3dca0f4 fix bug when 0 + other object 2014-03-16 22:52:25 +09:00
ksss a481976056 fix bool number to macro 2014-03-16 21:06:08 +09:00
cubicdaiya cee152670a unify indent style 2014-03-16 07:44:44 +09:00
Yukihiro "Matz" Matsumoto 62505d51cc calc hash value directly for strings, symbols and numbers 2014-03-15 15:53:12 +09:00
Yukihiro "Matz" Matsumoto 048bca43c9 string length type to be mrb_int 2014-03-15 15:47:21 +09:00
Yukihiro "Matz" Matsumoto c476c1b528 symbol length type to be mrb_int 2014-03-15 15:43:40 +09:00
Yukihiro "Matz" Matsumoto 2bd099c842 remove new_label(s) where label position can be obtained from genop() 2014-03-14 03:11:11 +09:00
Yukihiro "Matz" Matsumoto 91f2d47d34 too much optimization 2014-03-13 23:44:10 +09:00
Yukihiro "Matz" Matsumoto 8cc487c465 peephole optimization for OP_JMP{IF,NOT} 2014-03-13 19:54:50 +09:00
Yukihiro "Matz" Matsumoto 5b3c76ee48 Merge pull request #1849 from cremno/add-mrb_int_bit-macro
add MRB_INT_BIT
2014-03-13 03:09:58 +09:00
Yukihiro "Matz" Matsumoto ad04b45e5b Merge pull request #1851 from tmash06/add_include_limit_h
add including limits.h.
2014-03-13 03:09:03 +09:00
tmash06 cfcd2e2dc9 add including limits.h.
Because Android's libc(bionic) defines SIZE_MAX at limits.h.
2014-03-13 02:37:09 +09:00