# File test/lexertest.rb, line 63 def test_nextchars lex = JSON::Lexer.new("some_string") str = lex.nextchars(4) assert(str == 'some', "nextchars doesn't work correctly") assert_raises(RuntimeError, "exception not raised for substring bounds error") { lex.nextchars(10) } end