|
686 | 686 | @io = IOSpecs.io_fixture "read_euc_jp.txt", "r:euc-jp:utf-8" |
687 | 687 | end |
688 | 688 |
|
689 | | - it "raises an exception after ungetc" do |
690 | | - c = @io.getc |
691 | | - @io.ungetc(c) |
692 | | - -> do |
693 | | - @io.read(2) |
694 | | - end.should.raise(IOError, "byte oriented read for character buffered IO") |
695 | | - end |
696 | | - |
697 | 689 | it_behaves_like :io_read_internal_encoding, nil |
698 | 690 | it_behaves_like :io_read_size_internal_encoding, nil |
699 | 691 | end |
|
703 | 695 | @io = IOSpecs.io_fixture "read_euc_jp.txt", mode: "r:euc-jp:utf-8" |
704 | 696 | end |
705 | 697 |
|
706 | | - it "raises an exception after ungetc" do |
707 | | - c = @io.getc |
708 | | - @io.ungetc(c) |
709 | | - -> do |
710 | | - @io.read(2) |
711 | | - end.should.raise(IOError, "byte oriented read for character buffered IO") |
712 | | - end |
713 | | - |
714 | 698 | it_behaves_like :io_read_internal_encoding, nil |
715 | 699 | it_behaves_like :io_read_size_internal_encoding, nil |
716 | 700 | end |
|
723 | 707 | @io = IOSpecs.io_fixture "read_euc_jp.txt", options |
724 | 708 | end |
725 | 709 |
|
726 | | - it "raises an exception after ungetc" do |
727 | | - c = @io.getc |
728 | | - @io.ungetc(c) |
729 | | - -> do |
730 | | - @io.read(2) |
731 | | - end.should.raise(IOError, "byte oriented read for character buffered IO") |
732 | | - end |
733 | | - |
734 | 710 | it_behaves_like :io_read_internal_encoding, nil |
735 | 711 | it_behaves_like :io_read_size_internal_encoding, nil |
736 | 712 | end |
|
741 | 717 | @io = IOSpecs.io_fixture "read_euc_jp.txt", options |
742 | 718 | end |
743 | 719 |
|
744 | | - it "raises an exception after ungetc" do |
745 | | - c = @io.getc |
746 | | - @io.ungetc(c) |
747 | | - -> do |
748 | | - @io.read(2) |
749 | | - end.should.raise(IOError, "byte oriented read for character buffered IO") |
750 | | - end |
751 | | - |
752 | 720 | it_behaves_like :io_read_internal_encoding, nil |
753 | 721 | it_behaves_like :io_read_size_internal_encoding, nil |
754 | 722 | end |
|
0 commit comments