45 Commits

Author SHA1 Message Date
Kouhei Sutou e72e50b5d5 Hash sub class creates new sub class objects instead of Hash 2017-03-21 23:25:36 +09:00
Yukihiro "Matz" Matsumoto 817b884343 add #dig tests 2016-03-23 12:34:32 +09:00
Yukihiro "Matz" Matsumoto daf83946bb add #dig to Array,Hash and Struct 2016-03-23 11:49:28 +09:00
Yukihiro "Matz" Matsumoto 5c405dea3d include changed from by quotes ("") to by brackets (<>); close #3032 2015-11-27 17:48:23 +09:00
takahashim 621487a0cd add {Array|Hash|String}.try_convert 2015-11-24 08:39:39 +09:00
Yukihiro "Matz" Matsumoto fa86026a99 move Hash comparison methods to mruby-hash-ext gem 2015-11-15 05:15:20 +09:00
Seba Gamboa 25c8e95365 Revert "Mark core gems with mrbgem tag"
This reverts commit 5cdcce8dbd.
2015-10-21 14:31:13 -03:00
Seba Gamboa 13b552538a Remove obvious warnings from docs 2015-10-20 12:48:31 -03:00
Seba Gamboa 5cdcce8dbd Mark core gems with mrbgem tag 2015-10-20 12:16:47 -03:00
Jun Hiroe 570c261555 Refator Hash.fetch test 2015-09-26 09:58:36 +09:00
Asmod4n 4bd98671bc Problem: Hash#fetch doesn't raise KeyError when a key cannot be found
Solution: change the Exception class raised to KeyError when a key
cannot be found.
2015-09-17 13:28:09 +02:00
takahashim b88ca625ab fix block variable in Hash#fetch 2015-09-16 02:57:41 +09:00
Jun Hiroe 4e4929bc72 Rename extended xxxx class or module to xxxx class or module extension 2015-06-28 11:18:52 +09:00
Jun Hiroe c69d1201e1 Fix typo; Replace extensional with extended 2015-06-28 00:05:58 +09:00
Franck Verrot 2588507285 Remove unnecessary backticks.
Dr Markus Kuhn published in 1999 an article [1] explaining in details
why we shouldn't use the ASCII grave accent (0x60) as a left quotation.

Backticks have been used most notably to produce nice-looking LaTeX
documents but it doesn't seem to be an issue on modern platforms and
for the oldest ones, there are workarounds as mentioned by Dr Kuhn.

[1]: https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
2015-06-24 13:07:07 +02:00
Yukihiro "Matz" Matsumoto 50f54529f2 to_hash/to_a check in Hash[] should only be done when only one argument is given; ref #2594 2014-09-19 01:14:50 +09:00
INOUE Yasuyuki 5f16c41753 copy documentation comment from CRuby 2014-09-18 17:43:38 +09:00
INOUE Yasuyuki d30aadf306 remove line number from raise message 2014-09-18 17:37:48 +09:00
INOUE Yasuyuki e66d86a5fb refactor Hash generator loop 2014-09-18 16:07:27 +09:00
INOUE Yasuyuki 5603b8d79f implement Hash.[] 2014-09-06 22:50:06 +09:00
take_cheeze 4a6c651f82 Run mrbgem and core tests on minimum dependencies.
Solves #2355.

In test drivers:
* Uses `mrb_t_pass_result` to check and pass test result to main `mrb_state`.
* Adds `mrb_init_test_driver` to init test `mrb_state`.
2014-07-12 20:36:45 +09:00
Yukihiro "Matz" Matsumoto 172060877a add Hash#to_h; ref #2348 2014-06-04 18:57:31 +09:00
yui-knk d88a9d761f Add comment to Hash#each_pair. And change the line
Add comment about ISO.
Current place is misleading so change line No.
2014-05-10 20:16:19 +09:00
yui-knk 658a00ba49 Change to raise TypeError (Hash#merge, #merge!) 2014-05-10 10:18:15 +09:00
Jun Hiroe dc4c042df5 Add Hash#key 2014-05-09 00:46:33 +09:00
Jun Hiroe dcad562f73 Add Hash#keep_if 2014-05-05 20:26:28 +09:00
Jun Hiroe 015f60fcad Add Hash#invert 2014-05-05 11:15:48 +09:00
Jun Hiroe 28a858c17e Add Hash#flatten 2014-05-04 21:14:13 +09:00
Jun Hiroe 08f2bb0bc5 Add Hash comments 2014-05-04 19:49:16 +09:00
Jun Hiroe 3e7db4ad27 Add Hash#delete_if 2014-05-04 00:46:36 +09:00
Nobuyoshi Nakada ab67c57f65 remove trailing spaces 2014-04-30 09:50:14 +09:00
Yukihiro "Matz" Matsumoto 7e175d8130 add Hash#fetch; close #2134 2014-04-27 03:03:27 +09:00
take_cheeze b5028421b9 Use mrb_int in mrbgem rest argument getting. 2014-04-25 22:02:10 +09:00
Yukihiro "Matz" Matsumoto 2c44f96e78 reduce hash creation by using update method 2014-03-21 09:31:44 +09:00
Yukihiro "Matz" Matsumoto 298c07d6ca add Hash#each_pair 2014-03-21 09:19:53 +09:00
take_cheeze c73f8d4def move summary of mrbgems in default gembox to its spec 2014-03-17 00:34:24 +09:00
take_cheeze 658b4f4ea7 add test(requires MRB_GC_FIXED_ARENA enabled) 2014-02-22 00:28:38 +09:00
take_cheeze a9af8c9c07 fix possible arena overflow 2014-02-22 00:05:05 +09:00
cremno 4ffea85b62 hash / hash-ext: various small changes
src/hash.c:
 - mrb_hash_(aget|aset|dup|delete): internal linkage
 - remove documentation of methods which are not implemented (in here)
 - remove #assoc; unused, not in ISO spec
 - remove #rassoc: same, implementation is also wrong

hash-ext mrbgem:
 - remove header "mruby/khash.h"
 - remove mrb_hash_values_at (move code into hash_values_at, i: long -> int)
 - less whitespace in gem_init function
2014-02-13 13:39:09 +01:00
cremno aa655b9ee1 remove superfluous includes
- reduce compile time by a little bit (full-core: ~0.7s for me)
- thanks to 'include-what-you-use' for some help
- include Standard C header files before any other (coding style)
2014-01-07 17:56:30 +01:00
Daniel Bovensiepen b4e07a8051 Improve test of mruby-hash-ext GEM 2013-08-04 22:41:15 +08:00
Tomoyuki Sahara 116f75a8ce "spec.author" is better for single-author gems.
"spec.author=" expects a String represents a single author.
"spec.authors=" expects an Array which is a list of multiple authors.

http://guides.rubygems.org/specification-reference/
2013-07-23 10:09:24 +09:00
Masaki Muranaka a46eacb213 Move Hash#values_at to mruby-hash-ext gem. 2013-05-08 13:22:35 +09:00
Gilad Zohari 17eef070da add type check in Hash#merge! 2013-05-03 23:36:02 +03:00
Kouki Ooyatsu dfe2359b0c add mruby-hash-ext mrbgem, and method: Hash#merge! 2013-03-22 17:10:42 +09:00