summaryrefslogtreecommitdiffhomepage
path: root/test/t
AgeCommit message (Collapse)Author
2015-08-27Add String#freeze testJun Hiroe
2015-07-13Clean up testsBlaž Hrastnik
2015-07-13assert() cannot be nestedBlaž Hrastnik
2015-07-13Set origin when doing kind_of? comparisonsBlaž Hrastnik
2015-07-13Enable test_prepend_module_ancestors because it seems to pass.Blaž Hrastnik
2015-07-13Space out test_prepend_super_in_alias assertCorey Powell
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-13Enable visibility prepend tests againBlaž Hrastnik
2015-07-13Ported all MRI prepend testsCorey Powell
And of course, some of them fail miserably
2015-07-13Removed some debug prints from the testCorey Powell
2015-07-13Ported a bit more of the MRI Module#prepend tests overCorey Powell
Currently kind_of fails miserably, still looking for the reason
2015-07-13Rename classes because of conflictsBlaž Hrastnik
2015-07-13Implement Module#prepend.Blaž Hrastnik
2015-06-22fix arity of lambdas with optional argumentscremno
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-08gsub/sub supports back references in substitutes. fixes #2816.Tomoyuki Sahara
This implementation is compatible with CRuby's String#gsub/sub except \1 ... \9 and \+. They are useless without Regexp library.
2015-05-31fix masgn nosplat array rhs bugcremno
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-31update test/t/syntax.rb to success on CRubyYukihiro "Matz" Matsumoto
2015-05-31Merge branch 'failing-multiple-assignments-with-rest-tests' of ↵Yukihiro "Matz" Matsumoto
https://github.com/cremno/mruby into cremno-failing-multiple-assignments-with-rest-tests
2015-05-29check if outer is a class or modulecremno
For modules this check didn't exist yet. Also call #inspect.
2015-05-29add multiple assignment with rest testscremno
2015-05-07fix splat without assignment; fix #2781cremno
The parser generates NODE_NIL for tSTAR without argument in masgns. The codegen didn't handle that.
2015-04-17Fix to avoid warningMiura Hideki
2015-04-17Add test of negative arguments for Integer#%Miura Hideki
2015-02-24Fix a bug that no expression case doesn't return valid valueKouhei Sutou
Here is a script that reproduces this problem: x = case when true; 1 end p x # => main # 1 is expected
2015-02-24Fix a bug that if and no return value case can't return true clause valueKouhei Sutou
Here is a script that reproduce this problem: x = if true 1 else case 2 when 3 end 4 end p x # => nil # 1 is expected
2015-02-05Fix ensure with yield context on break and returnKouhei Sutou
How to reproduce: class A def x yield ensure y end def y end end # Work A.new.x do end # Not work # trace: # [2] /tmp/a.rb:5:in A.x # [0] /tmp/a.rb:15 # /tmp/a.rb:5: undefined method 'y' for main (NoMethodError) A.new.x do break end # trace: # [2] /tmp/a.rb:5:in A.call # [0] /tmp/a.rb:19 # /tmp/a.rb:5: undefined method 'y' for main (NoMethodError) lambda do A.new.x do return end end.call `self` in ensure is broken when yield and break/return are used.
2014-12-23Fix splat and multiple assignmentsKouhei Sutou
Case1: From variable Code: a = [1, 2, 3, 4, 5] b, c, *d = a p [a, b, c, d] Before: [[1, 2, 3, 4, 5], 1, 2, []] After: [[1, 2, 3, 4, 5], 1, 2, [3, 4, 5]] Ruby: [[1, 2, 3, 4, 5], 1, 2, [3, 4, 5]] Case2: From variables Code: a = [1, 2, 3] b = [4, 5, 6, 7] c, d, *e, f, g = *a, *b p [a, b, c, d, e, f, g] Before: [[1, 2, 3], [4, 5, 6, 7], 1, 2, [], 6, 7] After: [[1, 2, 3], [4, 5, 6, 7], 1, 2, [3, 4, 5], 6, 7] Ruby: [[1, 2, 3], [4, 5, 6, 7], 1, 2, [3, 4, 5], 6, 7] Case 3: "for" Code: a = [1, 2, 3, 4, 5, 6, 7] for b, c, *d, e, f in [a] do p [a, b, c, d, e, f] end Before: [[1, 2, 3, 4, 5, 6, 7], 1, 2, [], nil, nil] After: [[1, 2, 3, 4, 5, 6, 7], 1, 2, [3, 4, 5], 6, 7] Ruby: [[1, 2, 3, 4, 5, 6, 7], 1, 2, [3, 4, 5], 6, 7]
2014-12-17String#[] should reject nil indexh2so5
2014-11-27add multiple assignment decomposition testYukihiro "Matz" Matsumoto
2014-11-26fix(String) String#[] accepts float; close #2650 #2651Robert Mosolgo
2014-10-20instance_methods etc should not include undef'ed method names; based on a ↵Yukihiro "Matz" Matsumoto
patch from @cremno; fix #2613
2014-08-25Add test for Numeric#pow.Tatsuhiko Kubo
2014-08-20Remove empty lines.Tatsuhiko Kubo
2014-08-09Fix a bug that class variable can't be referenced from class methodKouhei Sutou
Class method defined in singleton class should be evaluated in class context not singleton class context. fix #2515
2014-07-18add Module#module_functiondreamedge
2014-06-19fix conflict resolution mistakeYukihiro "Matz" Matsumoto
2014-06-18resolve conflictYukihiro "Matz" Matsumoto
2014-06-18remove superclass test for classes that do not exist in mruby (core)Yukihiro "Matz" Matsumoto
2014-06-15Test all ISO defined classes direct superclass except `Object` class.take_cheeze
Move mrbgems ISO direct superclass test to `superclass.rb`. Skips test if class isn't defined. Close #2332.
2014-06-15Move direct superclass checking to `test/t/superclass.rb`.take_cheeze
2014-06-11str_replace: self should not be shared and nofreeksss
2014-06-07move String#clear to mruby-string-ext; ref #2370Yukihiro "Matz" Matsumoto
2014-06-07Implement String#clearJun Hiroe
2014-06-02Implement `NoMethodError#args`.take_cheeze
2014-06-01remove part of 9cd71916 test for same reason as 5306e47Yukihiro "Matz" Matsumoto
2014-05-25Merge pull request #2320 from yui-knk/test-enumerableYukihiro "Matz" Matsumoto
Replace assert_true with assert_equal.
2014-05-25Merge pull request #2316 from ksss/test-exceptionYukihiro "Matz" Matsumoto
Exception#exception fix test
2014-05-25Merge pull request #2315 from suzukaze/fix-test-procYukihiro "Matz" Matsumoto
Fix assert_equal argument order in test/t/proc.rb
2014-05-25Replace assert_true with assert_equal.yui-knk
2014-05-25Change to use assert method.yui-knk
2014-05-25fix typo.yui-knk