diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2016-12-12 00:49:23 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-12-12 00:49:23 +0900 |
| commit | 1fbad32f8bce2a10c591d0e44796bc34913a0e8c (patch) | |
| tree | 8ba3d7bd9992f0097f99a034012565adb43c4d4a /test/t/array.rb | |
| parent | 3cc913490b708fe4d0e78e48f86e6e39cf3d8576 (diff) | |
| parent | 10bb7ad693e7c7443de924a39c1fedb4461108ba (diff) | |
| download | mruby-1fbad32f8bce2a10c591d0e44796bc34913a0e8c.tar.gz mruby-1fbad32f8bce2a10c591d0e44796bc34913a0e8c.zip | |
Merge pull request #3340 from k0kubun/object-freeze
Implement Object#freeze
Diffstat (limited to 'test/t/array.rb')
| -rw-r--r-- | test/t/array.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/t/array.rb b/test/t/array.rb index 9cc2f64ad..cf7ed4704 100644 --- a/test/t/array.rb +++ b/test/t/array.rb @@ -373,3 +373,10 @@ assert("Array#rindex") do $a = [2, 3, 4, 5, 6, 7, 8, 9, 10, Sneaky.new] assert_equal 0, $a.rindex(1) end + +assert('Array#freeze') do + a = [].freeze + assert_raise(RuntimeError) do + a[0] = 1 + end +end |
