merge revision(s) 46896-46898: [Backport #10078]

	* string.c (rb_str_count): fix wrong single-byte optimization.
	  7bit ascii can be a trailing byte in Shift_JIS.
	  [ruby-dev:48442] [Bug #10078]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@47401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
merge revision(s) 47090: [Backport #10114]

	* parse.y (parser_yyerror): preserve source code encoding in
	  syntax error messages.  [ruby-core:64228] [Bug #10114]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@47402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e