Issue #7947 has been updated by kosaki (Motohiro KOSAKI).


committed at r39713 and r39714.

----------------------------------------
Bug #7947: Queue#clear ?????????ゃ?? Queue ???????????????c??????
https://bugs.ruby-lang.org/issues/7947#change-37476

Author: clicube (Cubing Cube)
Status: Assigned
Priority: Normal
Assignee: kosaki (Motohiro KOSAKI)
Category: core
Target version: current: 2.1.0
ruby -v: ruby 2.0.0dev (2013-02-24 trunk 39476) [x86_64-darwin11.4.2]


????樟雎。
Queue#clear
???
def clear
  @que.clear
end
????茖??????????????? Array#clear ??? self ???菴???????э??腟??????????????????? @que ???菴???c?????障??鐚?

????????????????????????
1.
??????т戎??c??????紊???違??≪??祉?鴻?с????????障????障??鐚?
鐚?????????? instance_eval ??с?≪??祉?鴻?????????????????違?с????????????с?????鐚?
2.
Array ??? Queue ??? #push ??? #pop ???????????????鐚?
Queue#clear ?????????ゃ?絲??????<?純??????????с?若?潟?? #push ?????膵????????????????????
????若??莎激?????????????????????????????????????違????贋・??吾??????????????障????醇?с?????????????????障??鐚?

???????????????ゃ?????
篁???????Queue#clear??ф????ャ????障????????鐚?
Queue?????????SizedQueue???<?純????????ゃ????? Array ???絲丞О?с???????????????
???Queue#push
???Queue#clear
???SizedQueue#push
???SizedQueue#clear
??? self ???菴??????鴻??????????????障?????鐚?
篁ヤ??4??<?純????????ゃ????????眼???????????????????????羞私???????障??鐚?

?????鴻??????茵?腟??????篁ヤ???с??鐚?
$ ./ruby -I./lib -I. test/thread/test_queue.rb
Run options: 

# Running tests:

Finished tests in 1.680776s, 7.1396 tests/s, 13.6842 assertions/s.    
12 tests, 23 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0dev (2013-02-24 trunk 39476) [x86_64-darwin11.4.2]

????????????ゃ??????鴻???????鴻?????吾?????/絎?茵???号?????篆??????????с?????鐚?????????с????????с???????????鐚?
IRC??х?梧????????c?????????????????鴻??鐚?????????????????????????障?????鐚?



-- 
http://bugs.ruby-lang.org/