[#71815] [Ruby trunk - Bug #11768] [Open] Add a polymorphic inline cache — tenderlove@...
Issue #11768 has been reported by Aaron Patterson.
tenderlove@ruby-lang.org wrote:
On Thu, Dec 03, 2015 at 10:51:08PM +0000, Eric Wong wrote:
Aaron Patterson <tenderlove@ruby-lang.org> wrote:
[#71818] [Ruby trunk - Feature #11769] [Open] optimize case / when for `nil` — tenderlove@...
Issue #11769 has been reported by Aaron Patterson.
tenderlove@ruby-lang.org wrote:
[#71931] [Ruby trunk - Feature #11786] [Open] [PATCH] micro-optimize case dispatch even harder — normalperson@...
Issue #11786 has been reported by Eric Wong.
Oops, I forgot to free the table when iseq is destroyed :x
On 2015/12/08 12:43, Eric Wong wrote:
SASADA Koichi <ko1@atdot.net> wrote:
On 2015/12/08 13:53, Eric Wong wrote:
[#72028] [Ruby trunk - Feature #11405] [Assigned] [PATCH] hash.c: minor speedups to int/fixnum keys — mame@...
Issue #11405 has been updated by Yusuke Endoh.
mame@ruby-lang.org wrote:
[#72045] Ruby 2.3.0-preview2 Released — "NARUSE, Yui" <naruse@...>
We are pleased to announce the release of Ruby 2.3.0-preview2.
Please add your optimizations before RC1.
SASADA Koichi <ko1@atdot.net> wrote:
On 2015/12/11 18:06, Eric Wong wrote:
SASADA Koichi <ko1@atdot.net> wrote:
[#72069] [Ruby trunk - Feature #11405] [PATCH] hash.c: minor speedups to int/fixnum keys — mame@...
Issue #11405 has been updated by Yusuke Endoh.
[#72115] Re: [ruby-cvs:60264] duerst:r53112 (trunk): * enc/ebcdic.h: new dummy encoding EBCDIC-US — "U.NAKAMURA" <usa@...>
Hi,
On 2015/12/14 22:34, U.NAKAMURA wrote:
Hi,
[ruby-core:72278] [Ruby trunk - Bug #9713] __FILE__ return unexpected encoding - breaks Dir.glob
Joseph Jones liked your message with Boxer. On December 4, 2015 at 06:35:43 MST, thomas@thomthom.net wrote:Issue #9713 has been updated by Thomas Thomassen.Revisiting this issue again. Is there a resolution to what can be done to improve this and still satisfy compatibility concerns?----------------------------------------Bug #9713: __FILE__ return unexpected encoding - breaks Dir.globhttps://bugs.ruby-lang.org/issues/9713#change-55235* Author: Thomas Thomassen* Status: Assigned* Priority: Normal* Assignee: cruby-windows* ruby -v: ruby 2.2.0dev (2014-04-07 trunk 45528) [i386-mswin32_100] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN----------------------------------------**C:/てすと/FILE.rb:**~~~# encoding: UTF-8puts "Encoding.find 'filesystem': #{Encoding.find('filesystem').inspect}"puts "Encoding.find 'locale': #{Encoding.find('locale').inspect}"puts "Encoding.default internal: #{Encoding.default_internal.inspect}"puts "Encoding.default external: #{Encoding.default_external.inspect}"puts "Encoding.locale_charmap: #{Encoding.locale_charmap.inspect}"puts "__FILE__: #{__FILE__.encoding.inspect}"puts "'foobar': #{'foobar'.encoding.inspect}"~~~**C:/FILE.rb:**~~~# encoding: UTF-8puts "Encoding.find 'filesystem': #{Encoding.find('filesystem').inspect}"puts "Encoding.find 'locale': #{Encoding.find('locale').inspect}"puts "Encoding.default internal: #{Encoding.default_internal.inspect}"puts "Encoding.default external: #{Encoding.default_external.inspect}"puts "Encoding.locale_charmap: #{Encoding.locale_charmap.inspect}"puts "__FILE__: #{__FILE__.encoding.inspect}"puts "'foobar': #{'foobar'.encoding.inspect}"puts ""puts "Loading C:/てすと/FILE.rb ..."require "C:/てすと/FILE.rb"~~~**Results:**~~~c:\ruby-220\usr\bin>ruby "C:\FILE.rb"Encoding.find 'filesystem': #Encoding.find 'locale': #Encoding.default internal: nilEncoding.default external: #Encoding.locale_charmap: "CP437"__FILE__: #'foobar': #Loading C:/???/FILE.rb ...Encoding.find 'filesystem': #Encoding.find 'locale': #Encoding.default internal: nilEncoding.default external: #Encoding.locale_charmap: "CP437"__FILE__: #'foobar': #c:\ruby-220\usr\bin>~~~Now, lets see how this affects Dir.glob:Test scenario - a folder structure like this:~~~C:/test/C:/test/foo/C:/test/てすと/~~~**C:/FILE.rb**~~~# encoding: UTF-8puts "Encoding.find 'filesystem': #{Encoding.find('filesystem').inspect}"puts "Encoding.find 'locale': #{Encoding.find('locale').inspect}"puts "Encoding.default internal: #{Encoding.default_internal.inspect}"puts "Encoding.default external: #{Encoding.default_external.inspect}"puts "Encoding.locale_charmap: #{Encoding.locale_charmap.inspect}"puts "__FILE__: #{__FILE__.encoding.inspect}"puts "'foobar': #{'foobar'.encoding.inspect}"puts ""pattern = File.join(File.dirname(__FILE__), "test", "*")puts "pattern.encoding: #{pattern.encoding.inspect}"result = Dir.glob(pattern)p resultp result.map { |file| file.encoding }puts ""puts "force encoding:"pattern.force_encoding("UTF-8")result = Dir.glob(pattern)p resultp result.map { |file| file.encoding }~~~**Result:**~~~c:\ruby-220\usr\bin>ruby "C:\FILE.rb"Encoding.find 'filesystem': #Encoding.find 'locale': #Encoding.default internal: nilEncoding.default external: #Encoding.locale_charmap: "CP437"__FILE__: #'foobar': #pattern.encoding: #["C:/test/foo", "C:/test/???"][#, #]force encoding:["C:/test/foo", "C:/test/\u3066\u3059\u3068"][#, #]c:\ruby-220\usr\bin>~~~Observe how when Dir.glob is fed a string based on __FILE__ it will return strings in the same encoding, even though the string should include Unicode characters. The Unicode characters are replaced by question marks. (Actual ASCII bytes for question mark: 63)Just by forcing the input string to UTF-8 will make Dir.glob return the expected strings with correct Unicode characters.I'm unsure of where the bug lies, but in terms of what I expected I would not have expected __FILE__ to return different encoding depending on the executing file containing Unicode characters. All files have been marked as UTF-8 in the file header.---Files--------------------------------media-20140407.png (83.1 KB)-- https://bugs.ruby-lang.org/