From: anamma06@... Date: 2017-11-11T21:28:31+00:00 Subject: [ruby-core:83741] [Ruby trunk Feature#14098] The HowToContribute guide can be improved Issue #14098 has been updated by ana06 (Ana Maria Martinez Gomez). @shevegen > An example, or a separate entry at the wiki for such an example, might be useful to have there. Yes, it would be great. > I think the NEWS entry at https://github.com/ruby/ruby/blob/trunk/NEWS is largely hand-written Should I add new changes to this file when creating a PR with a new feature for example? > I do not think that there is any implicit code style for ruby. There is more than one way to write ruby :) - or actually, the one to enforce ruby convention is the ruby parser. One could find a matz-style (where the best style would be how matz writes ruby) but I think this does not exist either. Rubocop enforces one particular default style but there are many who don't use that style, so I think it would be difficult to assume that ruby code (or C-style code) has to follow a convention. It may be that the C code in MRI may have some style. Perhaps the C code how nobu writes it, is the best variant. :D With code style I was more focused on the C code which makes Ruby, and not in how to write Ruby. But actually both are interesting, as Ruby code is used in the documentation. I think having a defined style makes both understanding the code and write new code much easier. > Array code in C could be found at: https://github.com/ruby/ruby/blob/trunk/array.c > > This one has a certain naming style/convention. But I also find some inconsistencies in this file. For example: - Spaces between operators: ``` C ARY_SET_LEN(ary, idx + 1); EMMOVE(ptr, ptr+n, VALUE, RARRAY_LEN(ary)-n); ``` ---------------------------------------- Feature #14098: The HowToContribute guide can be improved https://bugs.ruby-lang.org/issues/14098#change-67780 * Author: ana06 (Ana Maria Martinez Gomez) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- I miss some important information in the [HowToContribute guide](https://bugs.ruby-lang.org/projects/ruby/wiki/HowToContribute): - how is the code tested? Should I add new test of my code? where, how and how to execute it? - How are important changes tracked? How is the changelog created? should I write my changes somewhere when modifying the code? - Is the code following any style rule? Is this somewhere documented? Thanks! -- https://bugs.ruby-lang.org/ Unsubscribe: