[ruby-cvs:68358] k0kubun:r61181 (trunk): struct.c: show `keyword_init: true` on inspect

k0kubun at ruby-lang.org k0kubun at ruby-lang.org
Wed Dec 13 00:03:46 JST 2017


k0kubun	2017-12-13 00:03:45 +0900 (Wed, 13 Dec 2017)

  New Revision: 61181

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61181

  Log:
    struct.c: show `keyword_init: true` on inspect
    
    for debugging if it's specified for the Struct class.
    This follows up r61137.
    
    We don't provide a method to check it because I don't think of any use
    case, but showing this to inspect would be helpful for debugging if
    someone is debugging whether keyword_init is properly enabled or not.
    
    In this commit, I didn't show `keyword_init: false` because of backward
    compatibility. Ideally any application should not depend on the behavior
    of inspect, but I don't have strong motivation to break it too.
    
    [close GH-1773]

  Modified files:
    trunk/struct.c
    trunk/test/ruby/test_struct.rb


More information about the ruby-cvs mailing list