Commit Graph

7440 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto fb7776586e hash value may be overflown from Integer
mruby special.
2016-11-22 18:00:04 +09:00
Yukihiro "Matz" Matsumoto be73905c9c accept floats as bit operator operands; fix #3260 2016-11-22 17:59:41 +09:00
Yukihiro "Matz" Matsumoto 8112295031 Removed fix_shift_get_width()
Fixnum is usually big enough for shift width.
2016-11-22 17:45:07 +09:00
Yukihiro "Matz" Matsumoto 740bf09740 add bit operators ~,&,|,^ to Float class (mruby special) 2016-11-22 17:36:26 +09:00
Yukihiro "Matz" Matsumoto a70104798e remove unnecessary ".!"; ref #3261 2016-11-22 16:55:18 +09:00
Yukihiro "Matz" Matsumoto bbaf3c242d Merge pull request #3261 from ksss/range-first
Reimplements Range#first
2016-11-22 16:38:24 +09:00
Yukihiro "Matz" Matsumoto 03e399accf Merge pull request #3262 from dabroz/feature-nanbox64fix
Fixed NaN boxing for 64-bit configrations
2016-11-22 16:36:43 +09:00
Yukihiro "Matz" Matsumoto de415b7bc0 Merge pull request #3264 from naclyhara/patch-1
Fix typo in test
2016-11-22 16:34:45 +09:00
Yutaka HARA aaa86a1fd5 Fix typo in test 2016-11-22 16:25:18 +09:00
Tomasz Dąbrowski b21b02465e asserts checking validity of pointer and TT added for mrb_obj_value
Useful for testing when using boxing on different platforms.
2016-11-21 12:37:45 +01:00
Tomasz Dąbrowski c385782cfe mrb_assert definition moved to the beggining of mruby.h
So that other files can immediately use it.
2016-11-21 12:37:45 +01:00
Tomasz Dąbrowski 8cdaf1ed35 Fixed NaN boxing for 64-bit configrations on platforms that use full 48-bit usermode pointers
Definition of boxed pointer is following:
`111111111111TTTT TTPPPPPPPPPPPPPP PPPPPPPPPPPPPPPP PPPPPPPPPPPPPPPP`

Previously, only the last 32-bit were set, and remaining 14 bits were zeroed when setting `ttt`.
2016-11-21 12:37:45 +01:00
Tomasz Dąbrowski d86f5d2dca mruby architecture detection 2016-11-21 12:37:45 +01:00
ksss 682237be6e Reimplements Range#first
Range#first shouldn't call `Range#to_a` on infinity range.
2016-11-21 16:55:49 +09:00
Yukihiro "Matz" Matsumoto a3f8206ce6 Merge pull request #3259 from dabroz/feature-16bitfix1
Fix for sprintf test exceeding bounds with MRB_INT16
2016-11-21 10:22:47 +09:00
Tomasz Dąbrowski 4289e0cd81 Fix for sprintf test exceeding bounds with MRB_INT16 2016-11-21 00:37:03 +01:00
Yukihiro "Matz" Matsumoto 3ce51cbc7c Merge pull request #3257 from ksss/range-size
Fix Range#size results
2016-11-21 01:15:37 +09:00
ksss 22390aa1c8 Use mrb_float instead of double 2016-11-19 23:25:08 +09:00
ksss a2fbd80a47 Fix Range#size results 2016-11-19 23:25:07 +09:00
Yukihiro "Matz" Matsumoto 0ff3ae1fba Range#include?: simplify condition; ref #3255 2016-11-18 11:54:24 +09:00
Yukihiro "Matz" Matsumoto b03b1e37d9 Merge pull request #3255 from ksss/range-include
Fix condition of Range#include?
2016-11-18 11:48:49 +09:00
ksss 4ef591c897 Fix condition of Range#include? 2016-11-18 10:01:03 +09:00
Yukihiro "Matz" Matsumoto 2a38bf9116 Merge pull request #3254 from herwinw/doc
Doc
2016-11-18 00:02:58 +09:00
Herwin Weststrate 18d6994f78 Documented most methods in mruby/hash.h 2016-11-17 11:52:28 +01:00
Herwin Weststrate d20c56c7fa Documented most methods in mruby/array.h 2016-11-17 11:41:49 +01:00
Herwin Weststrate c043dc631e Typo fix: poped => popped 2016-11-17 11:05:27 +01:00
Yukihiro "Matz" Matsumoto 57900d809f String#include? does not take integers 2016-11-17 18:02:10 +09:00
Yukihiro "Matz" Matsumoto 92be276d76 String#{strip,lstrip,rstrip} may cause OOB access 2016-11-17 18:00:21 +09:00
Yukihiro "Matz" Matsumoto 2e8ed9514f Removed mruby-inline-struct gem from default.gembox; ref #3251
bundled testing gems do not need to be included in default.gembox.
all gems under mrbgems are linked automatically in the test process.
2016-11-17 17:19:49 +09:00
Yukihiro "Matz" Matsumoto 8438792d27 renamed "inline" to "istruct" to represent inline struct; ref #3251 2016-11-17 17:19:49 +09:00
Tomasz Dąbrowski 4cca8bac6b inline structures data type for mruby (MRB_TT_INLINE) (fix #3237)
Inline structures have no instance variables, no finalizer, and offer as much space as possible in RBASIC object. This means 24 bytes on 64-bit platforms and 12 bytes on 32-bit platforms.
mruby-inline-struct gem is only provided for testing.
2016-11-17 17:19:49 +09:00
Yukihiro "Matz" Matsumoto 784e07f902 Merge pull request #3252 from BanzaiMan/patch-1
Remove webhook notification for Travis CI
2016-11-17 16:46:26 +09:00
Yukihiro "Matz" Matsumoto c8b028027f Merge pull request #3253 from ksss/range
Ranges should not rewrite
2016-11-17 16:44:58 +09:00
ksss 176d93d72a Ranges should not rewrite 2016-11-17 14:57:30 +09:00
Hiro Asari 1ba61f055c Remove webhook notification for Travis CI
As travis-rubies now uses 3 Mac jobs to create archives for various OS
releases.

This is a bit wasteful if multiple builds pass in a short period.

Instead, Travis CI is now running a nightly build of mruby-head
(around 22:30 UTC). This will happen regardless of the state of the
master branch.
2016-11-16 19:41:40 -05:00
Yukihiro "Matz" Matsumoto 5208ee534f Merge pull request #3250 from dabroz/feature-correct-aspec
Correct argument specifications for few methods
2016-11-17 00:41:54 +09:00
Tomasz Dąbrowski 8e0dc6fa8d Correct argument specifications for few methods:
- Struct#values_at
 - Module#define_method
 - String#chop
 - String#chop!
2016-11-16 15:46:28 +01:00
Yukihiro "Matz" Matsumoto 1685eff2a5 Fixed off-by-one error in String#[]= with Ranges 2016-11-16 10:16:14 +09:00
Yukihiro "Matz" Matsumoto 1f554ff854 Fixed rindex calling into mrb_equal bug
Fixed by Alex Snaps and reported by Mathieu Leduc-Hamel,
both from shopify.com.  Thank you!
2016-11-16 02:10:44 +09:00
Yukihiro "Matz" Matsumoto 242b219471 Fixed memory disclosure in String#lines
Reported from from Alex Snaps via Mathieu Leduc-Hamel,
both from shopify.com.  Thank you!
2016-11-16 02:05:19 +09:00
Yukihiro "Matz" Matsumoto 92f72c7490 make String#[]= to take Ranges as position argument 2016-11-16 02:04:56 +09:00
Yukihiro "Matz" Matsumoto 739dad6e87 Fixed a memory problem in Array#to_h
Reported from Alex Snaps via Mathieu Leduc-Hamel,
both from shopify.com.  Thank you!
2016-11-16 01:29:04 +09:00
Yukihiro "Matz" Matsumoto 4f6cce059b class/module statement should re-open; fix #3225 2016-11-15 04:15:24 +09:00
Yukihiro "Matz" Matsumoto 1422e57630 move mrb_str_dup() to mrb_class_path; ref #2470
Class#to_s used to return same string repeatedly,
that mean you can modify "class name" by modifying
the return value from Class#to_s.
2016-11-13 16:17:44 +09:00
Yukihiro "Matz" Matsumoto 01dddaf385 rename mruby-module-ext to mruby-class-ext; ref #2470 2016-11-13 16:17:44 +09:00
take_cheeze 451985d44b Implement Module#name.
Solves #2132.
2016-11-13 16:17:36 +09:00
Yukihiro "Matz" Matsumoto 88604e39ac Hash#[] to call Hash#default 2016-11-12 05:23:05 +09:00
Yukihiro "Matz" Matsumoto feb9b3debd Merge pull request #3224 from ksss/define_method
Module#define_method supports proc argument
2016-11-11 22:57:52 +09:00
Yukihiro "Matz" Matsumoto 752ca514f6 do not dump_node if parser failed 2016-11-11 22:51:48 +09:00
Yukihiro "Matz" Matsumoto 185dad3a6e node_dump() to print NODE_HEREDOC terminator 2016-11-11 22:50:41 +09:00