Commit Graph

674 Commits

Author SHA1 Message Date
ksss 9dc820590f Should raise LocalJumpError when no block given 2016-07-14 13:03:25 +09:00
Yasuhiro Matsumoto 8a15ab0c0c add test for public_methods(false) 2016-06-18 01:21:21 +09:00
Yukihiro "Matz" Matsumoto dd072b5364 remove wrong ISO section from safe navigation test; ref 4c1ce0f6 2016-03-24 23:35:04 +09:00
Yukihiro "Matz" Matsumoto 4c1ce0f61c add safe-navigation operator tests 2016-03-23 08:51:25 +09:00
bggd a138ae3506 Fix doesn't work bintest on :visualcpp toolchain 2016-03-07 14:50:21 +09:00
Sayed Abdelhaleem f5f48d9400 protect NoMethodError from calling to_hash in replace 2016-01-27 21:17:33 +02:00
Yukihiro "Matz" Matsumoto 8143285956 Merge pull request #3080 from kou/fix-class-variable-in-module
Fix class variable reference in module
2016-01-11 10:00:34 +09:00
Kouhei Sutou ad492eb9f3 Fix class variable reference in module
Fix #3079
2016-01-11 00:34:15 +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 4fdec33ff4 simpler t_print 2015-12-30 14:25:05 +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
Zachary Scott 3f228c1da4 Fix "ambiguous first argument" warning 2015-12-17 00:12:19 +09:00
murase_syuka ef95dcd390 Bugfix nagative-number lshift() bit overflow 2015-11-18 21:37:17 +09:00
murase_syuka a4d5588101 Bugfix lshift() bit overflow; close #3023 2015-11-18 01:00:46 +09:00
mimaki 22464fe5a0 mruby-1.2.0 2015-11-17 18:02:30 +09:00
Akira Mitsui 1238739997 fail to debuild 2015-11-09 23:57:45 +09:00
cremno bb141e5532 fix ambiguous first argument warning
/home/travis/build/mruby/mruby/test/t/float.rb:201:17:
ambiguous first argument; put parentheses or even spaces
2015-11-06 18:35:19 +01:00
Yukihiro "Matz" Matsumoto 6b3fd18262 clarify asserts to UTF-8 test suites; ref #2971 2015-10-01 19:32:29 +09:00
Yukihiro "Matz" Matsumoto cb76ed8ec4 Merge pull request #2971 from mattn/utf8-chop
chop with utf-8. fix #2967
2015-10-01 19:27:35 +09:00
Yasuhiro Matsumoto 545d649eff fix tests on windows.
'bin/mruby' not work on windows. so correct command name and quoted arguments.
2015-09-30 16:13:02 +09:00
Yasuhiro Matsumoto 7ad75a4a19 fix tests 2015-09-30 13:08:11 +09:00
Yasuhiro Matsumoto d5f145076c chop with utf-8. fix #2967 2015-09-29 21:22:45 +09:00
Yukihiro "Matz" Matsumoto 798ec3aff4 UTF-8 string support in core
define MRB_UTF8_STRING (in mrbconf.h) to enable UTF-8 support.
2015-09-24 02:37:33 +09:00
Yukihiro "Matz" Matsumoto 6a06a3e48d String#rindex should no longer take integer argument 2015-09-23 01:06:26 +09:00
takahashim f1c23a0f75 support String#[]= with 3 args 2015-09-16 18:50:03 +09:00
Yukihiro "Matz" Matsumoto 698b3c925d add Hash#rehash to handle key modification; ref #2945 2015-09-10 23:03:53 +09:00
Yukihiro "Matz" Matsumoto 8bb7962eb8 Merge branch 'module-prepend' of https://github.com/polyfox/mruby into polyfox-module-prepend 2015-09-04 04:01:49 +09:00
Yukihiro "Matz" Matsumoto c6aa87c837 Merge pull request #2924 from zzak/mruby-test
Extract mrbtest to binary gem
2015-09-03 00:43:21 +09:00
Yukihiro "Matz" Matsumoto 3a462fe468 Integer << and >> to use Float instead of raising RangeError 2015-09-02 23:41:51 +09:00
Zachary Scott 87564dc98f Make travis happy
We have do this because mruby's test files are found using MRUBY_ROOT, like this:
    mrbs = Dir.glob("#{MRUBY_ROOT}/test/t/*.rb")
2015-09-02 09:56:27 -04:00
Yukihiro "Matz" Matsumoto 74696ffd96 Float << and >> should be more compatible to Fixnum 2015-09-02 22:29:01 +09:00
Terence Lee b432f12fdd run bintests within subfolders of bintest/ 2015-08-31 18:54:42 -04:00
Jun Hiroe 69e835cd0f Add String#freeze test 2015-08-27 21:44:56 +09:00
Zachary Scott 383a7d24d3 Move test source code and rake task to mrbgem 2015-08-22 10:18:12 -04:00
Blaž Hrastnik 78462c9181 Clean up tests 2015-07-13 23:46:41 +02:00
Blaž Hrastnik 8c4da7accd assert() cannot be nested 2015-07-13 23:38:37 +02:00
Blaž Hrastnik 8c13e2b7c6 Set origin when doing kind_of? comparisons 2015-07-13 23:35:30 +02:00
Blaž Hrastnik b0fb9ccfd8 Enable test_prepend_module_ancestors because it seems to pass. 2015-07-13 23:25:01 +02:00
Corey Powell 11cb41770d Space out test_prepend_super_in_alias assert
Also tried to fix it, however the problem lies with how aliased methods
are done and their internal structure.

mruby simply aliases methods by grabbing the RProc and giving it a new name,
super then determines the original method to call by using the name

so a method called m, aliased as m2, will call the m2 super method instead of m
2015-07-13 10:45:57 -05:00
Blaž Hrastnik 11dad71578 Enable visibility prepend tests again 2015-07-13 14:04:43 +02:00
Corey Powell 47264bf289 Ported all MRI prepend tests
And of course, some of them fail miserably
2015-07-13 14:04:42 +02:00
Corey Powell 319553f0ef Removed some debug prints from the test 2015-07-13 14:04:42 +02:00
Corey Powell 99aff17075 Ported a bit more of the MRI Module#prepend tests over
Currently kind_of fails miserably, still looking for the reason
2015-07-13 14:04:42 +02:00
Blaž Hrastnik d046814d8b Rename classes because of conflicts 2015-07-13 14:04:42 +02:00
Blaž Hrastnik f962890a92 Implement Module#prepend. 2015-07-13 14:04:42 +02:00
cremno f0eaf9eaf5 fix arity of lambdas with optional arguments
From the CRuby 2.2.2 Proc#arity documentation:

If the block has optional arguments, returns -n-1, where n is the number
of mandatory arguments, with the exception for blocks that are not
lambdas and have only a finite number of optional arguments; in this
latter case, returns n.
2015-06-22 13:34:24 +02:00
Tomoyuki Sahara 5dd2b8e16f gsub/sub supports back references in substitutes. fixes #2816.
This implementation is compatible with CRuby's String#gsub/sub
except \1 ... \9 and \+.  They are useless without Regexp library.
2015-06-08 17:32:14 +09:00
cremno 5cd877be7f fix masgn nosplat array rhs bug
The rest lhs variable has to be an empty array if rhs is an array with
less elements than pre + post lhs variables. The codegen generated
OP_ARRAY with an invalid length (such as 127 for *a, b = []) because rn
was negative.
2015-05-31 13:30:49 +02:00
Yukihiro "Matz" Matsumoto 9ef4bbb10d update test/t/syntax.rb to success on CRuby 2015-05-31 18:29:26 +09:00