Ruby Issue Tracking System: Issueshttps://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112021-01-25T11:15:59ZRuby Issue Tracking System
Redmine Ruby master - Feature #17579 (Open): [Proposal] A suggestion for newline-separated shorthand nota...https://redmine.ruby-lang.org/issues/175792021-01-25T11:15:59Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>New year, new proposal! :)</p>
<p>Summary (TL;DR) of the proposal first: It is here proposed that ruby adds functionality to allow ruby users to create arrays, with (string) members inside that array that may contain ' ' (space) characters.</p>
<p>This is akin to, as a shorthand notation, to well known variants like the following one here:</p>
<pre><code>%w( foo bar ) # => ["foo", "bar"]
</code></pre>
<p>(Note that this creates two members in the array, "foo" and "bar"; my suggestion here is about creating a single String with ' ' one space, e. g. "foo bar" in the example above. Note that I do NOT suggest to change the existing %w() syntax; we would need another syntax for this in my opinion, ideally also just one character.)</p>
<p>Since ruby code is often significantly simpler to understand than a long sentence, let me next show you what I mean with the proposal above.</p>
<p>Consider the following array:</p>
<pre><code>array = [
'foo bar',
'bar foo',
'tom the cat',
'jerry the mouse'
]
</code></pre>
<p>Here we have an array with four members; four string objects, each containing at the least one ' ' (space) character. It may also include strings that do not contain any ' ' though.</p>
<p>Ruby offers several shorthand notations to create arrays.</p>
<p>A very popular one, and in my (not systematic) opinion probably the most commonly used variant, found in many gems, ruby users use this pattern here commonly:</p>
<pre><code>array = %w( one two three )
# or other "container" tokens used, such as:
array = %w[ one two three ]
array = %w{ one two three }
</code></pre>
<p>Today I had a use case to create the following array:</p>
<pre><code>array = [
'choice 1',
'choice 2',
'choice 3',
'choice 4',
'choice 5',
'choice 6',
'choice 7',
'choice 8'
]
</code></pre>
<p>This is ok, syntax-wise; also efficient, so the suggestion here is not that important actually.</p>
<p>But!</p>
<p>I also wondered whether we ruby users COULD actually use a shorter variant for precisely situations like the above. (For anyone wondering why I made such a strange array, I actually wanted to create simple radio-buttons for ruby-gtk, as a "drop-down" choice, so I needed a simple array where the user can select one of these different variants, before hitting the "send" or "submit" button. So the above acted mostly as a place holder for prototyping code. In general I make use of %w() a lot though, so perhaps that is why it felt "natural" for me to want to try to look for simpler ways here. %w() is really very efficient IMO.)</p>
<p>Of course my first "logical" attempt would not work:</p>
<pre><code>array = %w(
choice 1
choice 2
choice 3
choice 4
choice 5
choice 6
choice 7
choice 8
)
# => ["choice", "1", "choice", "2", "choice", "3", "choice", "4", "choice", "5", "choice", "6", "choice", "7", "choice", "8"]
</code></pre>
<p>This of course won't work due to the ' ' and %w() splitting on ' '. But the syntax is quite elegant, yes? Short and succinct - it is nice and efficient.</p>
<p>So, I was then wondering whether we <strong>could</strong> have a variant that <strong>also</strong> includes the ' ', and splits on newlines rather than ' '.<br>
(For spacing reasons all leading ' ' are also ignored on the newline. This could be argued about either way, but I probably would prefer to be able to retain such a uniform styling in my .rb files, sort of like how %w() can be used. So my whole idea is really mostly aimed at %w(), just with newline splitting rather than ' ' splitting.)</p>
<p>I wondered whether we could re-use EOF with there here-doc token. Example what I mean here:</p>
<pre><code>heredoc = <<-EOF
choice 1
choice 2
choice 3
choice 4
choice 5
choice 6
choice 7
choice 8
EOF
</code></pre>
<p>Just an array, rather than a string. Would be quite efficient. (Evidently heredoc will NOT ignore leading ' ' so it is a bit different anyway.)</p>
<p>But then I was thinking ... I am already using newlines there, for readability purposes, see above. So my array will be spread over multiple new lines. So, one new line, one new array element - quite simple! And this is <strong>the</strong> <strong>gist</strong> of my suggestion here really:</p>
<ul>
<li>A way to create arrays in ruby based on newlines.</li>
</ul>
<p>If a variant already exists that splits on newlines by default, please disregard this suggestion then. My mind was thinking mostly about shorthand-notation syntax here.</p>
<p>As for the syntax for this suggestion ... I am not sure ... this is perhaps the hardest part, because the syntax should be short too, as otherwise the advantage of succinctness would be lessened.</p>
<p>So, what do we have available in ruby? Let's look.</p>
<p>We have, for array of strings:</p>
<pre><code>%w() # I'll ignore the {} and [], so this is just to compile what we have right now.
</code></pre>
<p>Array of Symbols:</p>
<pre><code>%i( foo bar ) # see the old SO discussion here, if anyone is curious https://stackoverflow.com/questions/8816877/is-there-a-literal-notation-for-an-array-of-symbols
</code></pre>
<p>For regular expressions we have:</p>
<pre><code>%r()
</code></pre>
<p>For single-quoted strings and multi-line strings we have:</p>
<pre><code>%q()
</code></pre>
<p>Double-quoted string:</p>
<pre><code>%Q()
</code></pre>
<p>Shell command:</p>
<pre><code>%x() # I don't think I ever used this one actually ... I always use system() or `` and sometimes the popen-family
%s() # strange one here ... turns foo into a symbol (:foo). Peculiar ...
</code></pre>
<p>I quickly compared the last one with %i():</p>
<pre><code> %s( foo ) # => :" foo "
%i( foo ) # => [:foo]
</code></pre>
<p>I did not know about %s. How odd. :)</p>
<p>Anyway. My proposal here is about making the "split" based on newlines, just as the array example above (e. g. array = [ 'choice 1', etc..) showed.</p>
<p>I am not entirely sure which shorthand syntax should be used. Ideally we should not use too many shorthand notations in general, because ruby users may have a hard time remembering all of this; I can never remember the old perly $ variables, always have had to look up in a cheat sheet file or had to back when they were more commonly used.</p>
<p>But, since these elements in the array are still strings, perhaps they should remain with the %w() syntax family.</p>
<p>So, I was thinking, based on that ... something like %wn( ) for a newline?</p>
<p>Like:</p>
<pre><code>array = %wn(
choice 1
choice 2
choice 3
choice 4
choice 5
choice 6
choice 7
choice 8
) # = ['choice 1','choice 2','choice 3','choice 4','choice 5','choice 6','choice 7','choice 8']
</code></pre>
<p>Although, I am not sure ... it would be a simple change perhaps, just append a "n" character.</p>
<p>I much prefer single letters, though. So I am not convinced about %wn. The "n" is meant to stand for "newline" or "newlines".</p>
<p>Perhaps %n( ) for newline could be used? Or %W( ) could be used? Hmmmmm.</p>
<p>Syntax choice is sooooo difficult if you want to make a good choice that people could use. Perhaps %W() is not so good<br>
because people may make a typo, and confuse it with %w. So %n may be better. Or %wn. (I am trying to "remain" in<br>
a syntax "family", so that it may not be too obscure, although we could use another letter.)</p>
<p>But anyway, I believe it may be better to first decide whether this feature is good, useful, or totally pointless. And, based on that, e. g. if it is considered useful (possibly so), to then think more about the syntax choice for it. After all, if the idea is not useful, there is little point in wanting to find a useful syntax for it.</p>
<p>Please anyone feel free to comment if you would like to, and give ideas, pros and cons as to whether this may be useful to have or not. I think this can only be potentially useful IF other ruby users may have had a similar use case (because otherwise nobody would use it, so then it would be a mostly "dead" feature), but I am actually not even absolutely certain that the proposal is that useful.</p>
<p>It is probably quite a niche case idea; but who knows, perhaps at some later time, suggestions and ideas may be picked up again, so I think it would be useful to comment on this suggestion anyway, if only for future references alone. (Or perhaps it was already suggested years ago, I do not know.)</p>
<p>Hopefully I managed to make this suggestion readable; I was writing this in my local editor, as I have a hard time using webforum-based HTML interfaces in general.</p>
<p>At any rate, thanks for reading!</p> Ruby master - Misc #16890 (Rejected): [Ruby Keywords and Ruby 3.0 release] Feedback to matz and t...https://redmine.ruby-lang.org/issues/168902020-05-14T19:20:01Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>As some folks may already have read/heard, matz is asking for feedback.</p>
<p>He specifically asked this in regards to the rails devs, and the rails ecosystem<br>
but this may be relevant to all ruby users.</p>
<p>You can read his ideas here:</p>
<p><a href="https://discuss.rubyonrails.org/t/new-2-7-3-0-keyword-argument-pain-point/74980" class="external">https://discuss.rubyonrails.org/t/new-2-7-3-0-keyword-argument-pain-point/74980</a></p>
<p>In this introduction I do not intend to add anything more really; ioquatix<br>
suggested to (also) create a specific tracker here.</p>
<p>I will add my personal opinion after this.</p> Ruby master - Bug #16701 (Rejected): Odd output when using _1 ("ordinary parameter is defined")https://redmine.ruby-lang.org/issues/167012020-03-22T16:16:38Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>I have tried to reproduce this issue into a small script, so first the code, to ease<br>
copy/pasting (don't mind the quality; I encountered this in a larger script, so I<br>
just tried to narrow this down):</p>
<pre><code>@hash = {}
@hash['abc'] = { :a=>1, :b=>2, :c=>3}
@hash['def'] = { :d=>1, :e=>2, :f=>3}
def foobar(i = hash)
i.each {|first_argument, second_argument|
pp _1
pp second_argument
}
end
foobar
</code></pre>
<p>If you run the above code, the following output is given by ruby:</p>
<p><strong>foobar.rb:7: ordinary parameter is defined</strong></p>
<p>I am a bit confused as to why this is given. So perhaps this is not a<br>
bug after all, because it may be that named arguments can only be used if<br>
there is no explicit name given to them, such as in the above script done<br>
via <strong>|first_argument</strong>.</p>
<p>So this may not be a bug, but instead a wanted feature/specification. But if<br>
I then understand this correctly then it <strong>also</strong> disallows the use of<br>
named parameters while being able to use pp _1 <strong>if</strong> we already gave a<br>
name to the arguments. This then limits the functionality of pp _1 and I<br>
am not entirely sure why this must be the case.</p>
<p>I like giving explicit names, but in the very middle of writing code, I'd<br>
like to also be able to just quickly do e. g. "pp _1", often because<br>
I may forget the name of hash keys and values or nested hashes. So<br>
now I am a bit confused. Perhaps this is a bug, perhaps not. I have no<br>
idea, so I report this here anyway.</p>
<p>If this is not a bug, though, then this artificially limits the usefulness<br>
of _1 _2 since they are not allowed when we give an explicit name, which<br>
I used to think was possible (I may have missed the full specification).</p>
<p>In such a situation I would then be forced to either use _1 _2<br>
without an explicit name of the block parameters, or stick to<br>
the block parameters instead. Since my primary use case was more to use<br>
_1 _2 etc ... quickly, as means to be faster/shorter, that would mean<br>
that I'd only use explicit names for block parameters and skip _1 completely,<br>
which is also ok - I was just confused about the above behaviour, so I will<br>
report this here anyway.</p> Ruby master - Feature #16699 (Feedback): Silence/ignore particular warnings from some parts of th...https://redmine.ruby-lang.org/issues/166992020-03-19T20:54:40Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>I would like to make it possible to briefly enable or disable particular warnings: those related to modifying a constant or a method.</p>
<p>It is possible to silence a specific warning as in:</p>
<pre><code>SOME_CONSTANT = 42
old_verbose_value = $VERBOSE
$VERBOSE = nil
SOME_CONSTANT = 24
$VERBOSE = old_verbose_value
</code></pre>
<p>I needed to do so to redefine a method. I had to add an instance variable to that method. There are alternatives, e.g. including a module, or subclassing, but I wanted to just redefine the method as is, without incurring a warning message on the command line. The above way to re-assign $VERBOSE works fine. It should be kept. At the same time, though, looking at $variables is not that elegant, and it feels a tiny bit hackish too; plus, it may be useful if ruby users may use a more common idiom for this procedure.</p>
<p>I found out that rails has this:</p>
<pre><code>https://apidock.com/rails/Kernel/silence_warnings
</code></pre>
<p>It may be elegant to have a method, be it in Kernel, or in Warnings, or another particular name (silence_warnings is not a bad name).</p>
<p>There may be more use cases, but I am only thinking about these two use cases.</p>
<p>I refer ONLY to situations where the ruby developer would be aware that a warning would be silenced. I run with -w all the time, but not every warning is equally useful to me.</p>
<p>It may be helpful if you could comment a use case for something like this. It may be also helpful if others comment whether the use case may be useful<br>
or not.</p>
<p>We can only settle for a single short method. Otherwise, the current way would be better.</p> Ruby master - Bug #16475 (Closed): [Installation process - compiling ruby 2.7.0 from source} "mak...https://redmine.ruby-lang.org/issues/164752020-01-03T12:38:09Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby core team (and everyone else),</p>
<p>I have a slight oddity; it seems to be not hugely important, as it seems minor, but<br>
I will report it anyway just in case. Please disregard/close if this has already been<br>
reported before.</p>
<p>Situation:</p>
<p>I am trying to compile/install ruby-2.7.0 on the most recent linux mint (fresh<br>
installation).</p>
<p>The "make" step works fine. No error I could see there.</p>
<p>The "make install" step, however had, has one slight problem/warning:</p>
<pre><code>Traceback (most recent call last):
11: from ./tool/rbinstall.rb:942:in `<main>'
10: from ./tool/rbinstall.rb:942:in `each'
9: from ./tool/rbinstall.rb:945:in `block in <main>'
8: from ./tool/rbinstall.rb:794:in `block in <main>'
7: from ./tool/rbinstall.rb:830:in `install_default_gem'
6: from ./tool/rbinstall.rb:830:in `each'
5: from ./tool/rbinstall.rb:840:in `block in install_default_gem'
4: from ./tool/rbinstall.rb:278:in `open_for_install'
3: from ./tool/rbinstall.rb:841:in `block (2 levels) in install_default_gem'
2: from /Depot/j/ruby-2.7.0/lib/rubygems/specification.rb:2426:in `to_ruby'
1: from /Depot/j/ruby-2.7.0/lib/rubygems/core_ext/kernel_require.rb:92:in `require'
/Depot/j/ruby-2.7.0/lib/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- openssl (LoadError)
uncommon.mk:373: recipe for target 'do-install-all' failed
</code></pre>
<p>I believe this is due to linux mint not having openssl installed by default (probably not<br>
the dev-package either).</p>
<p>Ruby seems to work just fine otherwise, so this may just be a simple inconvenient<br>
warning - but if possible, I believe it would be better to, IF there is a step during the<br>
do-install-all action, to rescue this (and continue if something else has to be done).</p>
<p>Right now it seems to stop right at this point, with the "cannot load such file -- openssl"<br>
message, and I am not sure if there is anything else that has to be installed.</p>
<p>Note that I know how to work around this; I will just install/compile the other packages<br>
that are missing, then I can recompile ruby or just do so in the ext/ directory. But<br>
this is just an initial setup right now - I have to install the rest at a later time<br>
today. So I just report this here - not sure if it is known yet, but either way it<br>
may not be very elegant to fail or report that warning.</p>
<p>If it is of help, I will copy/paste the whole "make install" step next:</p>
<p>/Depot/j/ruby-2.7.0/make install</p>
<a name="-make-install-step-issued-here-"></a>
<h1 >^^^ make install step issued here ^^^<a href="#-make-install-step-issued-here-" class="wiki-anchor">¶</a></h1>
<pre><code>BASERUBY = echo executable host ruby is required. use --with-baseruby option.; false
CC = gcc
LD = ld
LDSHARED = gcc -shared
CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -std=gnu99
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -DCANONICALIZATION_FOR_MATHN -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/12.1.0
CPPFLAGS =
DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie
SOLIBS = -lpthread -lrt -lrt -ldl -lcrypt -lm
LANG = en_US.UTF-8
LC_ALL =
LC_CTYPE =
MFLAGS =
</code></pre>
<p>gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0<br>
Copyright (C) 2017 Free Software Foundation, Inc.<br>
This is free software; see the source for copying conditions. There is NO<br>
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
<p>./revision.h unchanged<br>
generating enc.mk<br>
making srcs under enc<br>
make[1]: Entering directory '/Depot/j/ruby-2.7.0'<br>
make[1]: Nothing to be done for 'srcs'.<br>
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'<br>
generating transdb.h<br>
transdb.h unchanged<br>
generating makefiles ext/configure-ext.mk<br>
ext/configure-ext.mk unchanged<br>
make[1]: Entering directory '/Depot/j/ruby-2.7.0'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/pathname'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/pathname'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/ripper'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/ripper'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/json'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/json'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/io/console'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/io/console'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/nkf'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/nkf'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/psych'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/psych'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/pty'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/pty'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/date'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/date'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/socket'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/socket'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/bigdecimal'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/bigdecimal'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/coverage'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/coverage'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/fiddle'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/fiddle'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/rubyvm'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/rubyvm'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/syslog'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/syslog'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/monitor'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/monitor'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/digest'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/digest'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0/ext/digest/sha2'<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0/ext/digest/sha2'<br>
make[2]: Entering directory '/Depot/j/ruby-2.7.0'<br>
./revision.h unchanged<br>
make[2]: Leaving directory '/Depot/j/ruby-2.7.0'<br>
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'<br>
make[1]: Entering directory '/Depot/j/ruby-2.7.0'<br>
*** Following extensions are not compiled:<br>
zlib:<br>
Could not be configured. It will not be installed.<br>
Check ext/zlib/mkmf.log for more details.<br>
readline:<br>
Could not be configured. It will not be installed.<br>
/Depot/j/ruby-2.7.0/ext/readline/extconf.rb:62: Neither readline nor libedit was found<br>
Check ext/readline/mkmf.log for more details.<br>
dbm:<br>
Could not be configured. It will not be installed.<br>
Check ext/dbm/mkmf.log for more details.<br>
openssl:<br>
Could not be configured. It will not be installed.<br>
/Depot/j/ruby-2.7.0/ext/openssl/extconf.rb:97: OpenSSL library could not be found. You might want to use --with-openssl-dir=</p> option to specify the prefix where OpenSSL is installed.<br>
Check ext/openssl/mkmf.log for more details.<br>
gdbm:<br>
Could not be configured. It will not be installed.<br>
Check ext/gdbm/mkmf.log for more details.<br>
-test-/cxxanyargs:<br>
Could not be configured. It will not be installed.<br>
/Depot/j/ruby-2.7.0/lib/mkmf.rb:471: The compiler failed to generate an executable file.<br>
You have to install development tools first.<br>
Check ext/-test-/cxxanyargs/mkmf.log for more details.<br>
*** Fix the problems, then remove these directories and try again if you want.<br>
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'<br>
making enc<br>
make[1]: Entering directory '/Depot/j/ruby-2.7.0'<br>
make[1]: Nothing to be done for 'enc'.<br>
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'<br>
making trans<br>
make[1]: Entering directory '/Depot/j/ruby-2.7.0'<br>
make[1]: Nothing to be done for './enc/trans'.<br>
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'<br>
making encs<br>
make[1]: Entering directory '/Depot/j/ruby-2.7.0'<br>
make[1]: Nothing to be done for 'encs'.<br>
make[1]: Leaving directory '/Depot/j/ruby-2.7.0'<br>
Generating RDoc documentation<br>
Parsing sources...<br>
100% [1141/1141] win32/README.win32
<p>Generating RI format into /Depot/j/ruby-2.7.0/.ext/rdoc...</p>
<p>Files: 1141</p>
<p>Classes: 1611 ( 755 undocumented)<br>
Modules: 327 ( 134 undocumented)<br>
Constants: 2434 ( 725 undocumented)<br>
Attributes: 1484 ( 558 undocumented)<br>
Methods: 13002 (3976 undocumented)</p>
<p>Total: 18858 (6148 undocumented)<br>
67.40% documented</p>
<p>Elapsed: 42.0s</p>
<p>./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" --rdoc-output=".ext/rdoc" --html-output=".ext/html"<br>
installing binary commands: /usr/bin<br>
installing base libraries: /usr/lib<br>
installing arch files: /usr/lib/ruby/2.7.0/x86_64-linux<br>
installing pkgconfig data: /usr/lib/pkgconfig<br>
installing extension objects: /usr/lib/ruby/2.7.0/x86_64-linux<br>
installing extension objects: /usr/lib/ruby/site_ruby/2.7.0/x86_64-linux<br>
installing extension objects: /usr/lib/ruby/vendor_ruby/2.7.0/x86_64-linux<br>
installing extension headers: /usr/include/ruby-2.7.0/x86_64-linux<br>
installing extension scripts: /usr/lib/ruby/2.7.0<br>
installing extension scripts: /usr/lib/ruby/site_ruby/2.7.0<br>
installing extension scripts: /usr/lib/ruby/vendor_ruby/2.7.0<br>
installing extension headers: /usr/include/ruby-2.7.0/ruby<br>
installing rdoc: /usr/share/ri/2.7.0/system<br>
installing html-docs: /usr/share/doc/ruby<br>
installing capi-docs: /usr/share/doc/ruby<br>
installing command scripts: /usr/bin<br>
installing library scripts: /usr/lib/ruby/2.7.0<br>
installing common headers: /usr/include/ruby-2.7.0<br>
installing manpages: /usr/share/man (man1, man5)<br>
installing default gems from lib: /usr/lib/ruby/gems/2.7.0 (build_info, cache, doc, extensions, gems, specifications)<br>
benchmark 0.1.0<br>
Traceback (most recent call last):<br>
11: from ./tool/rbinstall.rb:942:in <code><main>' 10: from ./tool/rbinstall.rb:942:in </code>each'<br>
9: from ./tool/rbinstall.rb:945:in <code>block in <main>' 8: from ./tool/rbinstall.rb:794:in </code>block in '<br>
7: from ./tool/rbinstall.rb:830:in <code>install_default_gem' 6: from ./tool/rbinstall.rb:830:in </code>each'<br>
5: from ./tool/rbinstall.rb:840:in <code>block in install_default_gem' 4: from ./tool/rbinstall.rb:278:in </code>open_for_install'<br>
3: from ./tool/rbinstall.rb:841:in <code>block (2 levels) in install_default_gem' 2: from /Depot/j/ruby-2.7.0/lib/rubygems/specification.rb:2426:in </code>to_ruby'<br>
1: from /Depot/j/ruby-2.7.0/lib/rubygems/core_ext/kernel_require.rb:92:in <code>require' /Depot/j/ruby-2.7.0/lib/rubygems/core_ext/kernel_require.rb:92:in </code>require': cannot load such file -- openssl (LoadError)<br>
uncommon.mk:373: recipe for target 'do-install-all' failed<br>
make: *** [do-install-all] Error 1</p> Ruby master - Feature #16287 (Open): Proposal to add .second and .third in particular to class Arrayhttps://redmine.ruby-lang.org/issues/162872019-10-31T12:23:42Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>I meant to suggest this earlier, but then I think I did not; if I actually did, then please excuse my forgetfulness and<br>
close the issue request here. I am very unorganized (also in reallife).</p>
<p>Anyway - I will be as short as possible here.</p>
<p>I would like to propose that we add <code>.second</code> and <code>.third</code>, in particular for <code>Array</code>s. I don't care that much for other<br>
data structures, so I will limit my initial suggestion here to the "minimum" case.</p>
<p>I will next explain as to why I suggest it (as many ruby core members said before, to demonstrate the use case,<br>
needs, trade-offs etc...).</p>
<p>Consider the following <code>Array</code>, aptly called array:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">array</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'cat'</span><span class="p">,</span><span class="s1">'dog'</span><span class="p">,</span><span class="s1">'horse'</span><span class="p">,</span><span class="s1">'fox'</span><span class="p">,</span><span class="s1">'snake'</span><span class="p">]</span>
</code></pre>
<p>So five elements, five animals.</p>
<p>The archetypical "default" (main) way to query the "slot" at a specific position, in ruby, is via the<br>
index number, and []. So for example:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">array</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="c1"># => "horse"</span>
</code></pre>
<p>So in this case we asked the array object for its third element (array index starts at 0).</p>
<p>This is all fine; we ruby users use this a lot.</p>
<p>We also have this available in ruby:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">array</span><span class="p">.</span><span class="nf">first</span> <span class="c1"># => "cat"</span>
<span class="n">array</span><span class="p">.</span><span class="nf">last</span> <span class="c1"># => "snake"</span>
</code></pre>
<p>This is often useful too, and I personally like this because it reads "naturally". But<br>
I think most of us may agree that the index specifier via [] is the main way for ruby<br>
to query elements at a certain position. We can also custom-define [] on our classes<br>
to allow for the [] to work (as syntactic sugar) on our own custom classes.</p>
<p>Now consider the following situation - we wish to return the first element, the last,<br>
and the second element.</p>
<p>This way works:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">array</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="n">array</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
</code></pre>
<p>This way also works:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">array</span><span class="p">.</span><span class="nf">first</span>
<span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="n">array</span><span class="p">.</span><span class="nf">last</span>
</code></pre>
<p>The last solution, however had, puts me a bit off, in the sense that I dislike<br>
the mixing of <code>[]</code> with longer <code>.method_name</code>, such as <code>.first</code> and <code>.last</code>.</p>
<p>In the last case, I think this would read better:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">array</span><span class="p">.</span><span class="nf">first</span>
<span class="n">array</span><span class="p">.</span><span class="nf">second</span>
<span class="n">array</span><span class="p">.</span><span class="nf">last</span>
</code></pre>
<p>I do not know if this has been suggested before; quite possibly it may have been<br>
suggested before. If anyone knows then perhaps there was a reason why the latter<br>
was not added.</p>
<p>To me, personally, from my point of view, I like a "symmetry" in the code here.</p>
<p>I have found in my own code when I end up with a situation like this:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">array</span><span class="p">.</span><span class="nf">first</span>
<span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="n">array</span><span class="p">.</span><span class="nf">last</span>
</code></pre>
<p>Then I tend to much prefer that one instead:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">array</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">array</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
<span class="n">array</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="c1"># Or another way to get the last element such as array.size instead.</span>
</code></pre>
<p>The reason for the latter is mostly that I feel it "reads" better. But if I use<br>
<code>.first</code> and <code>.last</code>, then I would prefer a positional name, such as <code>.second</code>.</p>
<p>You may wonder why I do not suggest <code>.fourth</code>, <code>.fifth</code> and so forth. Well, yes,<br>
this could be done too, but I think people will use these variants less and less.<br>
How often may it happen that you wanted to use <code>.fifth</code>, aka <code>[4]</code>? Probably not that<br>
often compared to <code>.first</code>, or <code>.last</code>, or even <code>[1]</code>. So my reasoning here is mostly<br>
about common use cases; I think <code>.second</code> and perhaps <code>.third</code> will be more common<br>
than e. g. .fifth. <code>.second</code> is probably significantly more frequent than <code>.third</code><br>
too - but I have no problem if more names would be available either. To me this<br>
is mostly a detail, not the big picture. I am trying to keep my suggestion here<br>
smallish, though, to make it simpler if it is decided that this may be a useful<br>
or wanted addition.</p>
<p>I should also add that I do not have any problem keeping using the <code>[]</code> variants.<br>
My use case is really motivated almost exclusively from <code>.first</code> and <code>.last</code> alone.<br>
These two names are probably by far the most commonly used method names, but<br>
I think <code>.second</code> may also be useful. And my reasoning is really mostly with the<br>
above explanation alone e. g. "symmetry" in code use between <code>array.first</code> and<br>
<code>array[1]</code>.</p>
<p>Please feel free to comment in any way as you see fit. I think this was perhaps<br>
suggested before but I can not find any older discussion (or perhaps it was<br>
many years ago or so, in which case it may be useful to have this more recent<br>
discussion too, if only to be able to point others to it if it may come up<br>
again in the future).</p>
<p>I also agree that the real benefit will be very small; at the same time, there<br>
should not be any major problem with the feature either. (Although, perhaps if<br>
matz may approve, it should come after ruby 3.0, just to not confuse people<br>
about this working; it may be easier to add it past ruby 3.0, so that ruby<br>
users do not have to wonder for now whether more method names to numbers may<br>
be available. I assume that Active* in rails may have this, but I don't know,<br>
I am still not using rails really, so I come from a non-rails point of view<br>
as well; I do use sinatra though, it's great - minimal code is great for<br>
being able to "build" flexible software.)</p>
<p>PS: I limited this to class <code>Array</code>. Perhaps the above would fit to other enumerable<br>
or enumerators (I mix these up all the time), but my common use case is really<br>
motivated almost exclusively by and for class <code>Array</code>. The reason is because I<br>
tend to end up with array data structures often; they are so easy to work with<br>
in ruby.</p> Ruby master - Bug #16194 (Closed): Can not compile the recent ruby 2.6.5 release due to some open...https://redmine.ruby-lang.org/issues/161942019-10-01T14:57:51Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>I am trying to compile the latest 2.6.5 release, just released recently:</p>
<pre><code>https://ftp.ruby-lang.org/pub/ruby/2.6/ruby-2.6.5.tar.xz
</code></pre>
<p>I had a problem, which will be mentioned soon; but I first made sure that I do not<br>
have this problem with ruby-2.6.4, so I believe something must have changed in<br>
behaviour.</p>
<p>Here is the configure line I was using for 2.6.4:</p>
<pre><code>./configure --prefix=/opt/ruby --enable-debug-env --enable-load-relative --enable-frozen-string-literal-debug --enable-pthread --enable-shared --with-ext=readline,openssl,+ --disable-install-capi --disable-install-doc --disable-install-rdoc
</code></pre>
<p>This was just a test-configure; both "make" and "make install" finished without an error though.</p>
<p>I then tried with 2.6.5 with exactly the same configure option as above, and this error appeared<br>
during <strong>make install</strong>:</p>
<pre><code>x86_64-linux/openssl.so: undefined symbol: EC_GROUP_new_curve_GF2m - /Depot/jjjj/ruby-2.6.5/.ext/x86_64-linux/openssl.so (LoadError)
make: *** [uncommon.mk:371: do-install-nodoc] Error 1
</code></pre>
<p>My local openssl is 1.1.1c by the way (also self-compiled; I compile everything from source,<br>
typically via help from ruby. I could try <a href="ftp://ftp.openssl.org/source/openssl-1.1.1d.tar.gz" class="external">ftp://ftp.openssl.org/source/openssl-1.1.1d.tar.gz</a><br>
perhaps but I have had some difficulties with openssl in the past, so I'd rather try more stable<br>
releases of openssl than unstable ones).</p>
<p>Anyway, I am just reporting this here so that the ruby core team is aware of the problem. No<br>
idea what EC_GROUP_new_curve_GF2m is, but it does not appear to occur on ruby-2.6.4.</p> Ruby master - Misc #16130 (Open): [Discussion / Ideas] Finding a good name for the concept of/beh...https://redmine.ruby-lang.org/issues/161302019-08-27T11:59:08Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>In recent presentions this year, and perhaps prior to that as well if I<br>
remember correctly, matz mentioned that the core team (and matz) may be<br>
looking for a good name to the concept of/behind guilds.</p>
<p>The thread here, this issue, is PRIMARILY confined with this, the name -<br>
if you have any good suggestion for names in this context, or discussions<br>
that may relate to this secondarily, please feel free to chime in and<br>
comment. This is primarily meant to give some ideas, possibly.</p>
<p>Since koichi is also heavily involved here (matz pointed out that koichi<br>
likes the name guilds, and came up with the idea/proposal/implementation),<br>
I think this should be considered too. And of course how ruby users may<br>
want to use/view the concept behind guilds, and actually use them in<br>
their own code - the best idea is not great if nobody is using the<br>
concept. Like with refinements ... great idea but I found the API<br>
somewhat strange. :D (May also be because subclassing is so easy with<br>
"Foo < Bar"; ideally we could have something like this with refinements<br>
too, but this is for another proposal or discussion - this here is<br>
about the name for the concept behind guilds.)</p>
<p>Anyway.</p>
<p>I'll give my opinion too, on the names, but I will decouple this from<br>
the initial suggestion here, and reply to my own issue.</p>
<p>Note that this here really is primarily concerned with finding a good<br>
NAME, which is not trivial, since names may have different meanings<br>
in different contexts.</p>
<p>Furthermore, some links for those who may be curious - some of which<br>
are old, and I really just randomly linked these in:</p>
<p><a href="http://www.atdot.net/~ko1/activities/2016_rubykaigi.pdf" class="external">http://www.atdot.net/~ko1/activities/2016_rubykaigi.pdf</a><br>
<a href="https://mensfeld.pl/2016/11/getting-ready-for-new-concurrency-in-ruby-3-with-guilds/" class="external">https://mensfeld.pl/2016/11/getting-ready-for-new-concurrency-in-ruby-3-with-guilds/</a><br>
<a href="https://olivierlacan.com/posts/concurrency-in-ruby-3-with-guilds/" class="external">https://olivierlacan.com/posts/concurrency-in-ruby-3-with-guilds/</a></p> Ruby master - Feature #16128 (Open): Would it be possible for ruby to warn about case/when menu o...https://redmine.ruby-lang.org/issues/161282019-08-25T15:52:14Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>I was not sure whether the following behaviour is a bug or not, so I filed this under "feature", mostly because<br>
this may change existing behaviour; and even if I think the current behaviour in this context may not make a<br>
lot of sense, perhaps there are caveats; or it may be too insignificant to want to change.</p>
<p>Anyway, without further ado, I will next show the ruby code that can be used to reproduce the issue/behaviour<br>
that I refer to:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">class</span> <span class="nc">Foo</span>
<span class="k">def</span> <span class="nf">initialize</span>
<span class="n">menu</span><span class="p">(</span><span class="ss">:random_colour</span><span class="p">)</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">menu</span><span class="p">(</span><span class="n">i</span><span class="p">)</span>
<span class="k">case</span> <span class="n">i</span><span class="p">.</span><span class="nf">to_s</span>
<span class="k">when</span> <span class="sr">/^-?-?random(-|_)?colou?r$/i</span><span class="p">,</span>
<span class="sr">/rcolour$/i</span><span class="p">,</span>
<span class="s1">'RCOL'</span><span class="p">,</span>
<span class="n">print_foobar</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">def</span> <span class="nf">print_foobar</span>
<span class="nb">print</span> <span class="s1">'foobar'</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="no">Foo</span><span class="p">.</span><span class="nf">new</span>
</code></pre>
<p>To those who may not immediately see the problem - it is the last ',' character<br>
in the case/when menu, right after the string 'RCOL'.</p>
<p>The above snippet was part of a much larger class/codebase, so I narrowed it<br>
down to this smaller example.</p>
<p>If you run this code, you will see no output. The reason is due to the ','.</p>
<p>If you remove the ',', then you get the desired output - the invocation of<br>
the method called print_foobar() which will print 'foobar'.</p>
<p>I discovered this strange behaviour by accident in a much larger case/when<br>
menu (my case/when menu interfaces can be excessively long, I admit this).</p>
<p>Sometimes I re-arrange the case menu, and then I may forget the ',' there,<br>
so I paste the ',' with the line, which sometimes leads to above situation,<br>
which tends to confuse me. I am quite used to this at this point, so<br>
discovering the problem does not take me long - but I was wondering whether<br>
this current behaviour is useful for anything?</p>
<p>Because if not then perhaps there could be a warning by ruby, possibly by<br>
the did-you-mean gem, or by ruby directly even without the did-you-mean<br>
gem (although I think this may fit the did-you-mean gem). I have, however<br>
had, decided to first report this to ruby core anyway, because perhaps I<br>
am missing something obvious that may explain the behaviour. Or perhaps it<br>
is difficult to distuingish what the next lines should be. But I assume<br>
that the ruby parser assumes another case/when statement here, after the<br>
',', so does not treat the above as an error or problematic behaviour.</p>
<p>Perhaps the above can still be reported based on additional information,<br>
such as correct indent level? I indent uniformly and consistently, so<br>
the above could provide additional cues what the ruby user at hand may<br>
have wanted to see - as in the example above, I don't think the trailing<br>
',' is useful; it was just a typo. I am not sure how easy it is to distinguish<br>
this case between cases where the user wanted to have a ','.</p>
<p>I am not sure how easy it would be to change the behaviour of ruby in<br>
this regard, or if it is wanted, or if it takes too much time, but I thought<br>
it is better to report it anyway - others can give their opinion in this<br>
case. Thanks!</p> Ruby master - Misc #15905 (Feedback): [Documentation] [Request for the wiki at https://bugs.ruby-...https://redmine.ruby-lang.org/issues/159052019-06-06T09:58:26Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby core team in particular and other ruby folks,</p>
<p>This issue request here is primarily about documentation, in particular in regards to a "statically compiled<br>
ruby". This refers either to a ruby that is completely static (no link to external .so), or, alternatively,<br>
to a ruby that is quite small and does not need lots of stuff, a bit like mruby, but for MRI (since I use<br>
MRI primarily, even though mruby is great). I will explain this in more detail, but first, I would like to<br>
point to the python wiki at:</p>
<p><a href="https://wiki.python.org/moin/BuildStatically" class="external">https://wiki.python.org/moin/BuildStatically</a></p>
<p>If you have a look at it then you can see specific instructions for how you can compile python statically,<br>
such as via:</p>
<pre><code>./configure LDFLAGS="-static" --disable-shared
make LDFLAGS="-static" LINKFORSHARED=" "
</code></pre>
<p>And some more steps before this would return the desired string "not a dynamic executable":</p>
<pre><code>ldd /path/to/python
not a dynamic executable
</code></pre>
<p>(Oddly enough, the extra steps mentioned on that python-wiki there are a bit cumbersome; I<br>
guess there was never any focus in python for static/embedded use per se.)</p>
<p>I would like to ask whether it would be possible to also add a <strong>short</strong> entry about a statically compiled<br>
ruby, to the wiki here at <a href="https://bugs.ruby-lang.org/projects/ruby-trunk/wiki" class="external">https://bugs.ruby-lang.org/projects/ruby-trunk/wiki</a>. I searched the wiki here, but<br>
I was unable to find more information about statically compiling ruby.</p>
<p>Note that matz has already described necessary steps for statically compiled mruby variants, for example<br>
here at github:</p>
<p><a href="https://github.com/mruby/mruby/issues/3707" class="external">https://github.com/mruby/mruby/issues/3707</a></p>
<p>Which is great. I myself use MRI predominantly, though, so it would be helpful for me to have the information<br>
available at the ruby wiki, ideally by someone who is more knowledgable than I am, and who actually knows how<br>
to do this for it to work. I myself encountered problems, and was unable to have a statically compiled ruby;<br>
I tried this back with an old glibc, though. (I could also use musl or other lib-c variants; I just lack the<br>
necessary knowledge to do so on my own.)</p>
<p>Possibly other ruby users may also appreciate having this information available, although I assume that the<br>
total number of ruby users who may desire or need a statically compiled ruby variant is quite low. Most people<br>
will probably use the full MRI that is officially released every ~xmas. (I myself also prefer this ruby - it<br>
is probably also the most widely one in use.)</p>
<p>My use case is mostly to have a variant of ruby that works very reliably, a bit like a statically compiled variant<br>
of busybox (which can easily be compiled statically; if you do "make menuconfig", you can find an entry point for<br>
static binaries, and the created busybox works well). I do not even need any extended features from ruby, such as<br>
openssl, readline etc... - it would be nice to have this, but here I am thinking more about a ruby variant that can<br>
be used in a "recovery" mode, or <strong>bootstrapping a new linux system</strong> . In fact, this is actually my primary use<br>
case altogether - I am building or trying to build (again) a LFS/BLFS (linux from scratch) with some differences<br>
to regular linux distributions. For example, I use a versioned AppDir approach rather than FHS /usr/ as the main<br>
prefix (homebrew uses something similar, as far as I know, via /usr/Cellar or some main prefix, or something like<br>
that).</p>
<p>The way I currently do so is via a chroot(ed) environment. Since I dislike shell scripts, I actually no longer use<br>
shell scripts really, and instead use ruby and ruby scripts for all the tasks that are required; ruby is simply<br>
much more efficient here, from a time point of view. Also more elegant. And if necessary, I can autogenerate shell<br>
code too, via ruby.</p>
<p>For a minimal environment, I think I would only need a ruby variant that can use basic file operations (such as<br>
FileUtils), possibly system() or Io/popen too, for tapping into awk, sed, make and so forth. The latter ones can<br>
be compiled statically and work very well. It would be great if I could complement this array of programs with<br>
a ruby variant that would also work as a statically compiled variant, at the least for the initial bootstrap<br>
phase (some programs will have to be recompiled in the chroot-environment, e. g. to "sanitize" the build toolchain).</p>
<p>In the distant future, it would be great if we could have a ruby that is super-flexible, working with the same<br>
code base for a minimal ruby (embedded use or "recovery-mode") up towards the default MRI for everyday tasks, or<br>
perhaps even just a ruby with like all active gems included ... fat-mode ruby. :P But I digress.</p>
<p>I hope I could explain my use case(s) a bit or at the least the point of view; I do not want to write that much<br>
more, so to conclude: I would like to ask for two things specifically, as far as this issue request here is<br>
concerned, <strong>only documentation</strong> :</p>
<ol>
<li>Please consider adding an entry to the wiki as to whether any statically compiled ruby, ideally a minimal<br>
variant, is possible to do: can be a simple yes or no</li>
</ol>
<p>2a) If yes, it is possible, please also show the commandline way that was used to do this, similar to the<br>
example of the python wiki.</p>
<p>2b) If it is not possible, not even any minimal ruby in a minimal environment, please mention this as well<br>
in the documentation. A short explanation may also be helpful as to why it is not possible (I only refer<br>
to a minimal ruby really; addons in ext/ such as readline or openssl are nice to have, but ultimately I<br>
would not need this in a restricted/minimal environment; I mostly just need a ruby that I could use as<br>
a replacement for bash + shell scripts, in particular for file operations and directory/symlink activities<br>
and system(), too).</p>
<p>Perhaps a wiki page similar to <a href="https://bugs.ruby-lang.org/projects/ruby/wiki/MJIT" class="external">https://bugs.ruby-lang.org/projects/ruby/wiki/MJIT</a> - does not have to<br>
be that long, just something short really. Anyway, I will finish this request here - please feel free<br>
to disregard/close this issue request for any reason; it is admittedly not extremely important, just<br>
would be nice to know whether it can be done, and how this could be done then. (I lack knowledge in C<br>
to be able to know why it may work or may not work, and how to get it to work.)</p> Ruby master - Feature #15817 (Open): Warnings for undef_method and remove_method on initialize()https://redmine.ruby-lang.org/issues/158172019-05-02T09:11:49Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Title: Warnings for undef_method and remove_method on initialize()</p>
<p>Right now ruby warns you if you remove or undefine initialize, at the least if you<br>
run in verbose mode e. g. the -w flag.</p>
<p>Example for such a warning:</p>
<pre><code>gtk_combo_box.rb:17: warning: undefining `initialize' may cause serious problems
</code></pre>
<p>What am I trying to do here, that caused this warning to appear, actually?</p>
<p>I am modifying some of the ruby-gtk code to extend the core gtk widgets with some<br>
"shortcuts", that is, functionality that I may use in order to write less code when<br>
I write ruby-gtk specific code.</p>
<p>Part of this means that I have to modify how initialize works for some of these<br>
widgets; in particular enabling support for some Symbols via blocks given to the<br>
initializer (I happily use/abuse Symbols that way; ruby-gtk has also added a few<br>
Symbols in the last few years, in particular to avoid having to type long CONSTANT<br>
names when it is not necessary - see Kouhei Sutou's continued efforts here).</p>
<p>In order to do this, and modify these gtk-widgets, I thus modify initialize - and<br>
ruby gives me warnings here.</p>
<p>The first warning I actually got was:</p>
<p>"warning: method redefined; discarding old initialize"</p>
<p>Ok, fair enough. So my idea was ... "I'll simply remove the old initialize, and<br>
then set a new one, aka my own variant. That way I won't get the warning anymore."</p>
<p>I then tried to use both remove_method, and undef_method, and while initialize is<br>
removed, ruby still warns me, e. g. with the "may cause serious problems" issue.<br>
This was the reason (and moment) for creating the issue request here.</p>
<p>I should say that I always run all my ruby code with warning flags enabled, set in<br>
the shebang-header in a .rb file. I find it very useful that ruby tells me if<br>
there may be something wrong in general. However had, in this particular case, I<br>
actually consider ruby warning me to be a feature that I would prefer to not have,<br>
in that particular instance. The reason is that I am actually specifically telling<br>
ruby to get rid of the old initialize, so it is a bit surprising to me that ruby<br>
warns me. Here the assumption may be that the ruby user did not know what was done,<br>
and although I am still quite clueless, I actually think that in this case I knew<br>
what I wanted to do - that is, getting rid of the old initialize, then setting a<br>
new initialize. (Perhaps ruby could detect such a case, where the ruby users removes<br>
the old initialize, then specifically defines a new one; this may solve the issue<br>
here, but I have no idea how feasible this may be, or how much work. Just mentioning<br>
it really.)</p>
<p>We can say that my approach is not a good one; this may well be, but the primary question<br>
is whether ruby should warn/notify us in such a case either way.</p>
<p>I think you can find arguments for both cases, e. g. that ruby warns us (some people may<br>
want this, even in this case) when it comes to undef_method/remove_method on initialize<br>
only - but it may also equally be the case that the ruby user at hands knows what she/he/it<br>
is doing. And I believe that in the latter case ruby should NOT warn about this. Obviously<br>
ruby then would need a way to distinguish between these two cases:</p>
<p>a) the case where the user wants to see a warning, because it may be helpful or for any other reason<br>
b) the case where the user does not want to see the warning, for whatever reason</p>
<p>This makes the issue request here a bit complicated, because while I actually think that<br>
ruby should not warn in regards to undef_method/remove_method, there are also perfectly<br>
valid use cases for the latter, where ruby should warn. One use case can be when people<br>
dynamically add/remove methods and may "accidentally" - and automatically - remove initialize,<br>
so in this case it would be a GOOD thing that ruby warns them. But in other cases, such as in<br>
the use case described here, I would rather prefer to not have ruby print anything about this<br>
to me.</p>
<p>There are workarounds of course - for example, I can temporarily silence on $VERBOSE, and then<br>
re-set it to the old value. I do this in other gems.</p>
<p>There may be other workarounds - perhaps working on a new copy of initialize and then replacing<br>
the old one differently (not sure if these work ... perhaps with some variant of the *eval-family).<br>
All of which is fine - my primary reason here is that I believe it should be simple for the<br>
ruby user to tell ruby to not warn about a specific error at hand, e. g. in all the cases where<br>
the user knows the problem domain (and thus does not need the warning at hand).</p>
<p>I have no really good general suggestion in how to improve this aspect here, because it may be<br>
better to make warnings in ruby more flexible in general. Perhaps even on a per module/class<br>
"namespace" - a bit similar to refinements, but with a simple(r) API and a simple(r) concept.</p>
<p>I don't have a good proposal here either, so this is just a little bit of feedback really. (If<br>
there are more similar comments about warnings in ruby in general, please feel free to close<br>
the issue here and gather discussions in any other tracker issue if you feel this to be better.)</p>
<p>To further explain the above issue - my use case was primarily motivated in order to silence the<br>
first warning. It took me a little bit by surprise that my course of action then led to another<br>
warning, which sort of defeated my original intent of silencing the other warning, since I now<br>
had a new warning issued on the commandline. :)</p>
<p>Hopefully I could describe the intent/idea behind the suggestion. It is of course nothing that<br>
is hugely important, since it is just a warning and the code works fine, but I kind of like<br>
seeing no warnings on the commandline actually (don't know why but I dislike seeing warnings<br>
when I can avoid them).</p>
<p>PS: I think for the particular issue at hand, I will do the old trick with temporarily modifying<br>
$VERBOSE. It feels a bit hackish, but it also kind of works, and I can then silence the specific<br>
warning at hand, e. g. "wrap" the offending code part between $VERBOSE or two method calls that<br>
modify $VERBOSE; so perhaps a more general solution may be to be able to modify $VERBOSE through<br>
method calls in general, though I don't know if this would make the code too slow, or where this<br>
method should reside (Kernel? Not sure) - I just think it may be nicer to read, API-wise, to have<br>
a method rather than have to modify $VERBOSE. But that is just an opinion really; the more<br>
important thing is that modifying $VERBOSE does work, so the functionality already exists<br>
for us to use as-is.</p> Ruby master - Misc #15748 (Closed): [Documentation] Suggestion to adjust Object.html#method-i-ins...https://redmine.ruby-lang.org/issues/157482019-04-04T05:47:43Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>This is not hugely important but since it was mentioned on reddit for<br>
whatever the intent (by surfordie), I'll add the issue here too.</p>
<p>The "issue" is a bit with the wording of:</p>
<p><a href="https://ruby-doc.org/core-2.6.2/Object.html#method-i-instance_variable_set" class="external">https://ruby-doc.org/core-2.6.2/Object.html#method-i-instance_variable_set</a></p>
<p>"Sets the instance variable named by symbol to the given object, thereby<br>
frustrating the efforts of the class's author to attempt to provide proper<br>
encapsulation."</p>
<p>I do not know who wrote this (not that it is important either), but I believe<br>
it is:</p>
<p>a) not a correct statement as such<br>
b) not necessary to word it like this.</p>
<p>I don't want to extensively explain why I think this is incorrect, because<br>
that would take too long. I guess we all know that ruby does not "provide"<br>
for "proper" (whatever that should even mean) encapsulation, largely because<br>
ruby's philosophy and OOP is very different from other languages, such as java,<br>
that assume that people have to be prevented from accessing/introspecting objects<br>
at "run"time. Also see the .send() versus .public_send() debate - I myself only<br>
make use of .send() and I think it's great. No clue what is frustrating about<br>
what is great. :)</p>
<p>But anyway, I don't think I have to explain this more here; the primary thing is<br>
that I think the explanation in the documentation could be changed. Rather than<br>
assume that any encapsulation is "proper", and the alternative would be "improper",<br>
by logical consequence (which I disagree with, too, just as I disagree with in that<br>
other thread assuming that @1 @2 were to lead to "sloppy programming" - I don't<br>
understand why people use such words), I propose to change the existing documentation<br>
to somewhat that is worded and described a bit more "objectively".</p>
<p>I can not think of a great description but since it may be easier for others to follow,<br>
I will start with an attempt at it - I will include the whole paragraph though:</p>
<p>"Sets the instance variable named by symbol to the given object. The variable<br>
does not have to exist prior to this call and could thus be set through this<br>
method. If the instance variable name is passed as a string, that string is<br>
converted to a symbol. The method can be used as a generic setter."</p>
<p>This is not perfect either, I am aware of that; it's just meant as a starter.<br>
Perhaps someone else has a better description - feel free to add that.</p>
<p>The primary goal is to get rid of conveying the opinion of whoever wrote it,<br>
e. g. to get rid of the "frustrating" section altogether. Perhaps it could be<br>
changed to point out that "encapsulation" is normally done through explicit setter<br>
and getters, but my main goal here was to just find a wording that isn't quite as<br>
hmm ... opinionated? I think it is better to not assume too much about the<br>
intent of anyone using the method. I use it very happily sometimes and I<br>
never understand how this could "frustrate" anyone - duck patching is a great<br>
feature, or just adding/removing methods at "run"time too. We could get into the<br>
philosophy of ruby too, but I just think that the documentation here may not<br>
be ideal. Then again I also don't think it is that important either.</p>
<p>(I guess another slight problem is trying to keep the whole documentation<br>
in a way as if it were written by a single individual who would write as<br>
objectively as possible. I understand that this is not easily feasible of<br>
course; just pointing it out. But someone else on reddit also mentioned that<br>
it is not necessary to word it like this, to which I agreed so since everyone<br>
seems too lazy to add an issue, I have to add one :P)</p> Ruby master - Feature #15580 (Open): Proposal: method addition to class String called .indices ( ...https://redmine.ruby-lang.org/issues/155802019-01-31T23:13:56Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello,</p>
<p>I am not sure whether this proposal has a realistic chance to be added to Ruby; but<br>
I think it is ok to suggest it nonetheless and let matz and the core team decide<br>
whether this may be a useful addition to ruby (at the least a bit), or whether<br>
it may not be a useful addition or not necessary. Also, I am trying to learn from<br>
sawa on the issue tracker here, making useful suggestions. :)</p>
<p>I propose to add the following <strong>new method</strong> to <strong>class String</strong> directly:</p>
<pre><code>String#indices
</code></pre>
<p>This would behave similar to String#index in that it will return the position<br>
of a substring, but rather than return a single number or nil, it should <strong>return<br>
an Array</strong> of all positions found between the main (target) String; and a substring<br>
match. If no match is found, nil should be returned, similar to String#index.<br>
(It may be possible to extend String#index to provide this functionality, but<br>
I do not want to get into the problem of backwards compatibility; and #indices<br>
seems to make more sense to me when reading it than #index, since the intent is<br>
a different one - hence why I suggest this new method addition.)</p>
<p>Right now <strong>.index</strong> on class String will return a result like this:</p>
<pre><code>'abcabcabc'.index 'a' # => 0
'abcabcabc'.index 'd' # => nil
</code></pre>
<p>So either the number of the first member found ('a', at 0), or nil<br>
if no result is found (in the example of 'd').</p>
<p>In general, the proposal here is to keep #indices behaviour the very<br>
same as #index, just with the sole difference being that an Array<br>
is returned when at the least one index is found; and all positions<br>
that are found are stored in that array.</p>
<p>What is the use case for this proposal or why would I suggest it?</p>
<p>Actually, the use case I have had was a very simple one: to find a<br>
DNA/RNA "subsequence" of just a single nucleotide in a longer DNA/RNA<br>
string. As you may know, most organisms use double stranded DNA (dsDNA)<br>
consisting of four different bases (A,T,C,G); and RNA that is usually<br>
single stranded (ssRNA), with the four different bases being (A,T,C,U).</p>
<p>For example, given the RNA sequence of a String like<br>
'AUGCUUCAGAAAGAGAAAGAGAAAGGUCUUACGUAG' or a similar String, I wanted to<br>
know at which positions 'U' (Uracil) would be in that substring. So ideally<br>
an Array of where the positions were. So that was my use case for<br>
String#indices.</p>
<p>We can of course already get the above as-is via existing ruby features.</p>
<p>One solution is to use .find_all - which I am actually using (and adding<br>
+1, because nucleotide positions by default start not at 0 but at 1). So<br>
I do not really need this addition to class String to begin with, since<br>
I can use find_all or other useful features that ruby has as-is just<br>
fine.</p>
<p>However had, I also thought that it may be useful for others if a<br>
String#indices method may exist directly, which is why I propose it here.<br>
Perhaps it may simplify some existing code bases out there to a limited<br>
extent if ruby users could use the same method/functionality.</p>
<p>There may be other use cases for String#indices, but I will only refer<br>
to the use case that I have found here. If others wish to add their use<br>
case please feel free to do so at your own leisure if you feel like it.</p>
<p>Please also do feel free to close this issue here at any moment in time if<br>
it is considered to be not necessary. It is not really a high priority<br>
suggestion at all - just mostly a convenience feature (possibly).</p>
<p>Thanks!</p>
<p>PS: I should also add that of course in bioinformatics you often deal with<br>
very large datasets, gigabytes/terabytes of genome sequencing data / Next<br>
generation sequencing dataset, but if you need more speed anyway then you may<br>
use C or another language to do the "primary" work; and ruby could do very fine<br>
with smaller datsets just as well; "big data" is not necessarily everywhere.</p>
<p>I only wanted to mention this in the event that it may be pointed out that<br>
String#indices may not be very fast for very long target strings/substrings -<br>
there are still many use cases for smaller substrings, for example. Perl<br>
was used very early in the bioinformatics field to good success, for<br>
instance.</p>
<p>As for documentation, I think the documentation for String#index could be<br>
used for String#indices too, just with the change that an Array of the<br>
positions found may be returned.</p> Ruby master - Feature #15565 (Open): Circular dependency warnings - suggestions/ideas to improve ...https://redmine.ruby-lang.org/issues/155652019-01-25T23:33:21Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby folks (and everyone else) reading this suggestion.</p>
<p>I will start with a mini-summary first, a TL;DR - this proposal suggests<br>
to "make it easier/better for us ruby users to solve/resolve/handle<br>
circular dependency warnings" or situations similar to these cases.</p>
<p>For example, take three files, called - "a.rb", "b.rb", "c.rb", without<br>
the "" quotes.</p>
<p>a.rb has a require line on b.rb, which in turn has a require line on<br>
c.rb, which in turn has a require line on a.rb. So they are<br>
inter-dependent on one another - a circular dependency situation.</p>
<hr>
<p>Before I describe the suggestion in more detail, I will take shyouhei's<br>
general advice and describe the primary use case, or problem domain that<br>
I sometimes face in reguards to circular dependency warnings or circular<br>
dependency situations in a ruby project.</p>
<p>The next section thus is an attempt to describe the problem domain, in<br>
particular from my point of view (I can not talk for others, but I<br>
can describe my use case or problem):</p>
<hr>
<p>In my larger ruby projects, in particular for projects where you may have<br>
quite a lot of files, say, ... upwards of +50 .rb files, I sometimes have<br>
to re-arrange the project.</p>
<p>When I write to "re-arrange" the project, this means to rewrite some old<br>
code, sometimes delete old code, sometimes add new code, and moving files<br>
around, creating or removing or renaming directories. Things like that.</p>
<p>I guess everyone is doing this in general, even on windows (just when you<br>
use a GUI to do most of this), but we also have to pay attention in general<br>
as to where files are, so that we can find them. In ruby this is similar,<br>
where we are often using require, require_relative or load - and we have to<br>
know at the least the relative path to other .rb files. And the file also<br>
must exist at that position, too (though you can rescue non-existing files<br>
through a LoadError, of course).</p>
<p>Handling a ruby project is not so difficult when the project is in an overall<br>
good shape - but I also have old code which is of a lower quality. And, even<br>
more importantly, I make mistakes too. Sometimes I end up with circular<br>
dependency warnings because I may require a .rb file that may pull in another<br>
.rb file which may pull in another file ... I guess this may happen for other<br>
people too sometimes. To me it is not always instantly obvious which .rb file<br>
is the culprit. Sometimes I only notice this at a later time.</p>
<p>This does bring me sometimes into a situation where I have a circular dependency,<br>
and it is not very easy to see which file depends on which other file - at the<br>
least not for me.</p>
<p>Sometimes I also forget how I structured a project after some time, and it may<br>
not always be easy to clean up a large project, due to inter-dependencies<br>
and similar constraints. I have to think which .rb files should be loaded first,<br>
for example. This is not so difficult, but it still takes time and concentration.</p>
<p>Such situations are not always a lot of fun to resolve. They also take<br>
away time, since we may have to figure out which .rb file depends on which other<br>
.rb file. (In the event where the project has been written by me, it is my own<br>
code, so I blame myself for problems of course; but my general idea is that this<br>
part of ruby could perhaps be improved, a bit similar how the did-you-mean gem<br>
may have improved spotting typos in ruby code, or how rubocop can warn about<br>
certain code layout issues. Things like that.)</p>
<p>There are of course some strategies to cope with a situation like a circular dependency.<br>
A simple one that I have found works fairly well is to ... try to avoid any situation<br>
that can lead to a circular dependency - which I found works best when you try to be<br>
really minimal when starting with a (new) project.</p>
<p>You can start with the most important basic .rb files, and slowly extend from<br>
this point onward, by adding more code.</p>
<p>For example, I often create base-files that I need to re-use, such as in a way to keep<br>
track of the base directory of the given project (the one from where the other .rb<br>
files may be called); then constants that are re-used within the given project.<br>
Following this I may then add a base class from which I may be able to subclass,<br>
followed by some other toplevel methods (such as "Foobar.create_directory()"), and<br>
then often more specialized classes that do more project-specific activities.</p>
<p>When I approach projects in this way, I rarely end up with a circular dependency warning</p>
<ul>
<li>but sometimes I still make mistakes, and in fact when I was adding functionality to<br>
one of my larger projects a few hours ago, I had a circular dependency warning. This was<br>
also the primary reason, or the main trigger, for writing this issue suggestion here. :)</li>
</ul>
<p>If we look back at, I think, ruby 1.8.x, we did not have circular dependency warnings.<br>
At the least I do not remember that we had ...</p>
<p>While this may not be a perfect situation either (since avoiding circular dependency will<br>
also lead to cleaner, clearer and more consistently based projects), it was easier for<br>
me to not have to think about circular dependency situations. When ruby 1.9.x or 2.0.x<br>
emerged, I also had to resolve several of these circular dependency problems, which was<br>
not as much fun. It's still not that much fun either, which is a major reason why I<br>
wrote the suggestion here.</p>
<p>On a sidenote - I did want to suggest a better/different way before in how we can<br>
handle/cope with larger ruby projects, many months ago already. One smaller component<br>
was to make or ideally, avoid, circular dependency warnings/situations. But I still do<br>
not have a good proposal for improving the way how ruby deals with lots of .rb files in<br>
a new/better way, so this suggestion here is only about circular dependency warnings.<br>
Perhaps the current status quo situation could be improved in regards to circular<br>
dependency warnings.</p>
<hr>
<p>I will next try to briefly describe what I would typically see when I invoke a<br>
large ruby project that has circular dependencies, from the commandline.</p>
<p>I may see something like 2 up to 3 full-terminal sized output, where ruby<br>
would tell me that there is a circular dependency in effect.</p>
<p>I always run my .rb files with the -w flag, so ruby sort of puts me into the "mood"<br>
to get rid of any warnings here. I like to use -w, so I will always try to resolve<br>
a situation rather than avoid it, even if it is "just" a warning.</p>
<p>From the output that ruby printed, I had a vague idea which file would complain,<br>
but looking at that file I noticed that it would point to another file, which in<br>
turn would point to several other files which may point to lots of other .rb<br>
files ... and then I am confused.</p>
<p>And to be honest, I am not clever enough to easily figure out which file is to be<br>
blamed, from the generated output alone. This is another reason why I often "re-do"<br>
a project from the get-go, and put things back into place one-by-one - a bit as if<br>
you were to repair a mechanical clock that has many tiny pieces, where you re-build<br>
it systematically step-by-step. It's still tedious, though, and not a lot of fun.</p>
<p>It is not ruby's fault that my projects are not always perfect; the mistake is a<br>
user error in the end. But the situation is not a lot of fun, and I liked the<br>
approach in 1.8.x because ... I did not have to deal with these situations.<br>
Avoidance-behaviour from me, and I could stay lazy. :D</p>
<p>In fact, I am rewriting the project where I had this circular dependency warning<br>
right now, starting with the "bottom-to-top" approach described above; and I know<br>
that I will eventually resolve this problem, because I did so many times before,<br>
and it always worked. It also made the new code cleaner, and clearer, because I<br>
would often also improve it as I would "re-assemble" things - but it still takes<br>
quite a lot of time, and is not a lot of fun. I would like to make it easier to<br>
resolve such a problem.</p>
<p>What are the problems that I see?</p>
<p>I think I can only mention two points, a smaller one and then a larger one:</p>
<p>(1) Part of the problem may have to do with the changed way how errors are shown<br>
on the commandline; the older output may have been a bit less confusing for me, but<br>
I do not feel that strongly about it, only may have a slight preference for the<br>
older variant. But this is probably not the large issue, as the warning may still<br>
not be very helpful, so let's go to the larger problem perceived (2).</p>
<p>(2) I think the larger issue is that the output related from circular dependency warnings<br>
isn't too terribly useful as it is. If you compare the situation to the did-you-mean<br>
gem, or rubocop warnings in general, then the latter two are a lot more useful to me.</p>
<p>I do not have a good suggestion as to how to make the output from circular dependency<br>
warnings much better, but I would think that something like the did-you-mean gem would<br>
possibly be useful here. There could be suggestion, at the least into which files<br>
may have a problem; and perhaps even so which files are involved in the circular<br>
warning. That does not have to be a full stack trace, mind you; just something that<br>
may help get ruby folks started.</p>
<p>For example, a table or tabular output of which file may pull in which other file, sorted<br>
in some way could be used. The most problematic file could be shown on top of that table<br>
output or something like that (e. g. the file that may impact many other .rb files).<br>
To not make the output too long, perhaps only a maximum of 6-8 lines should be shown<br>
here. Ideally this would be enabled to be the default in a future ruby version (if<br>
the changes are approved), or it could be a gem, similar like the did-you-mean gem.<br>
That way people could decide on their own what they would prefer (since I like the<br>
did-you-mean gem, I always have it on).</p>
<p>When I write "the most problematic file could be shown on top", this may be a bit<br>
similar in how gcc or llvm/clang may indicate where an error is, in a given C or C++<br>
file. Like the output with the " ^-----" indicator line; I read that LLVM<br>
shows somewhat better messages here.</p>
<p>Coming back to ruby here, I would like to see which files are the one that are directly<br>
involved with a given circular dependency situation. For example, if it is these<br>
three files a.rb, b.rb and c.rb given out, the output could be something like:</p>
<pre><code> a.rb -> depends on b.rb
b.rb -> depends on c.rb
c.rb -> depends on a.rb
^^^
</code></pre>
<p>The three ^^^ could be colourized in red (but this may be optional). Perhaps we<br>
could also get some more detailed output, like a verbose-flag, or the like. A<br>
small treeview showing which file may depend on which other file; to not show<br>
too much perhaps only three levels of directory structure, at max, should be<br>
checked. And, as said, perhaps only some .rb files checked that way on a given<br>
run.</p>
<p>Perhaps only show for the very last c.rb that it has a circular dependency - this<br>
could simplify the suggestion a little.</p>
<p>Of course it is up to the ruby user to resolve any situation related to circular<br>
dependencies in the end, but any extra information ruby could give could be<br>
helpful, in my opinion.</p>
<p>The above just shows some suggestions, of course; other layouts may be helpful<br>
as well - for example, it could be counted how often a file is required, or<br>
how many circular dependencies that file has, and this finding be reported, so<br>
that the ruby user can first look at such a file (biggest troublemaker).</p>
<p>I understand that the above may not be very trivial to write code for as of yet,<br>
but part of my suggestion is to get the ruby core team aware that there might be<br>
situations where parts of ruby could possibly be improved (perhaps in ruby 3.0).</p>
<p>I remember the time when we did not have the did-you-mean gem, and in fact, many<br>
years ago I mentioned that I sometimes accidentally write "def intialize", and<br>
the did-you-mean gem also handles such a situation. So sometimes it takes a<br>
while for change to happen. :)</p>
<p>(I also understand that not everyone may wish to see more verbose output in<br>
regards to circular-dependency warnings perhaps, which is why a gem may be<br>
ideal; but part of my suggestion is also to try to see that MRI ruby could<br>
be improved in this regard. Perhaps some of you have suggestions how to make<br>
MRI ruby behaviour more useful or better here.)</p>
<p>My hope is that we can, in the long run, lessen any frustration with circular<br>
dependencies in ruby; and, even more importantly so, be able to more<br>
easily/quickly resolve these situations. It is of course a user error in the<br>
end, but some projects are more complex than others, so it may be more likely<br>
that you may add a circular dependency without this being intentional.</p>
<p>I finally found the time to go ahead and write this suggestion. Sorry for it being long -<br>
the TL;DR comes again at the end to help anyone who only wants to jump through it<br>
and perhaps quickly make a short comment:</p>
<hr>
<ul>
<li>Please consider making it easier/better to resolve/handle circular dependency<br>
warnings in ruby, especially in larger ruby projects. Possibly with visual<br>
output/identifiers/cues similar to the did-you-mean gem.</li>
</ul> Ruby master - Misc #15275 (Closed): [DOCs] Documentation for ruby's jit model - from the ruby "en...https://redmine.ruby-lang.org/issues/152752018-11-01T15:21:31Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>This is a request about documentation, with the specific focus on the new ruby<br>
jit.</p>
<p>The "end user" perspective here means how an average ruby user may look at the<br>
jit; say, someone who may have been using ruby for some time, but may not be a<br>
"full" expert in ruby, just somewhat semi-advanced. A competent (in ruby),<br>
average person.</p>
<p>The aim of this feature request here is to, at the least, document how such a user<br>
may benefit from jit in his or her projects. I will explain more about this lateron,<br>
but since this request is a bit long, I have split it up into several subcomponents.</p>
<p>Up to this point the aim was mostly to provide a short explanation to this feature<br>
request, as introduction - the "TL;DR" variant.</p>
<hr>
<p>There are quite some documents, blog entries and presentations available in regards<br>
to ruby's jit. In particular matz spoke about this several times before; but also<br>
Takashi and Vlad spoke about the jit.</p>
<p>For example, in one video here, for those who may be curious, matz mentioned the<br>
jit (2018):</p>
<p><a href="https://www.youtube.com/watch?v=jqnVaYUcjCo" class="external">https://www.youtube.com/watch?v=jqnVaYUcjCo</a></p>
<p>(If you are only interested in the jit part, you can skip forward towards e. g.<br>
~10:30, or something like that.)</p>
<p>There are also documents and interviews about the jit-effort in ruby, such as<br>
here:</p>
<p><a href="https://blog.heroku.com/ruby-mjit" class="external">https://blog.heroku.com/ruby-mjit</a></p>
<p>But also elsewhere. Anyway; my focus here is on the "end user" perspective,<br>
of regular ruby users. How/if they can benefit from the jit. I assume that<br>
this also depends on the projects at hand.</p>
<p>Matz said that ruby 2.6.x will have jit, but this may not yet be the "fastest"<br>
jit; there will be more improvements in the future. I guess until ruby 3.x we<br>
can expect further changes here.</p>
<p>Matz also mentioned that not every program may benefit from the jit equally;<br>
for example, I/O heavy-tasks may not benefit much at all from the jit. Some<br>
projects may not run faster - and perhaps even run slower. Here I think it may<br>
be important that ruby users understand the trade-offs, advantages and<br>
disadvantages. That way they can make informed decisions in the future, in<br>
regards to their projects and the jit.</p>
<p>For me, as an end user, the main question is - which of my projects may<br>
benefit from the jit? How can I verify this or measure it? Should I use the<br>
jit for this project, but not that project? (Matz also gave another talk<br>
about memory usage and resource-constrained systems; I think there will be<br>
a large difference between classical desktop systems with a lot of RAM,<br>
and smaller smartphone-systems and so forth).</p>
<p>That is my primary reason for this request here, to provide a document<br>
and/or tutorial of some kind.</p>
<p>I should also mention that, obviously, the code itself for the jit has<br>
priority compared to the documentation, but documentation is also very<br>
important.</p>
<p>Back in the ruby 1.8.x to ruby 2.x days, there was not a lot of information<br>
available in regards to how to handle different Encoding situations. For<br>
example, it was new that String objects had an encoding attached. That also<br>
meant that String objects could have different encodings, and merging two<br>
String objects with different encoding led to problems (which could not<br>
happen in the 1.8.x days; or at the least did not happen as frequently).</p>
<p>It took me a while to learn and understand how to handle the new Encoding<br>
situation, which is also a reason why I am creating the issue request here,<br>
so that we can work towards documenting the jit from the end user perspective<br>
as well, in order to make it easier to work and use the jit. But, as said<br>
before, the code for the jit is more important in the sense that ... without<br>
that code, the documentation would not be useful. :)</p>
<p>This suggestion is also not about draining too much time from Takashi Kokubun<br>
and others in this regard. It is ok if documentation comes at a later time,<br>
say, somewhere in the year 2019 perhaps? At some point, though, it would be<br>
very useful for explaining to regular end users how to use jit, when not to<br>
use the jit, what can be expected in regards to speed improvements - things<br>
like that. I am sure there will be many blog entries about this in the future,<br>
but to me personally, I think it would be better if we learn about such changes<br>
from the official documentation rather than "random" blog entries (even though<br>
many such blog entries are very good, don't get me wrong).</p>
<p>With proper documentation, ruby users can understand the jit, as in how to use<br>
it.</p>
<p>I will next list some items that may be useful to have, but feel free to<br>
ignore them if you feel they are not that important to have. I will number<br>
them and list them, roughly, in order of importance, e. g. (1) is the<br>
most important suggestion, whereas (5) is not so important.</p>
<p>Hopefully I am not the only one who would appreciate useful documentation<br>
in this regard.</p>
<p>The documentation could be kept in a .md file distributed with the ruby<br>
tarball itself; and/or it could reside at <a href="https://ruby-doc.org/" class="external">https://ruby-doc.org/</a>; and/or<br>
at the ruby wiki.</p>
<p>But I think where the documentation for jit resides is not so important,<br>
as long as there is any place where it may be documented. When I write<br>
"documentation", I also specifically mean a "tutorial" or rather a document,<br>
with specific, different usage examples for the jit, too. There is quite<br>
some information available, spread out over github issue trackers (including<br>
some benchmarks), and blog entries (some in japanese, some in english) - I<br>
would like to see a single resource where useful information could be<br>
collected, and updated. This does not have to be long; but it should be<br>
useful. It should have an english version, too, but it could be in japanese<br>
first, and then translated into english (the examples will be in english<br>
anyway, and may be the most important part altogether).</p>
<hr>
<p>Suggestions:</p>
<p>(1) As a ruby end user, I would like to see specific usage examples in<br>
how to use jit, both commandline-use but perhaps also web-use for jit (e. g.<br>
be this rails and/or sinatra and/or padrino, just to see different examples;<br>
perhaps even via shebang-flags within the .rb files, similar to frozen-string<br>
literal, but this may require a separate suggestion; my issue here is really<br>
primarily about documentation for jit). A few examples here may be useful<br>
to provide ruby users with a start.</p>
<p>(2) As a ruby end user, I would appreciate some information AND benchmarks<br>
in regard to projects when it comes to the jit. This should also show some<br>
information in regards to time spent, as a benchmark; a bit similar to optcarrot.</p>
<p>For example:</p>
<pre><code> | default time without JIT | time with JIT | gain
</code></pre>
<hr>
<p>project A | 100% | 98% | +2% faster<br>
project B | 100% | 88% | +12% faster<br>
etc..</p>
<p>This is just a suggestion. The aim here is to give people a short overview<br>
what they may expect. For project A, project B etc... I may suggest<br>
commonly used programs in ruby or example .rb files. These could be<br>
distributed within ruby itself (perhaps test-files, or optcarrot-components),<br>
or they could point to .rb files stored somewhere else, be it on github<br>
or anywhere else. The key idea is to just give some projects as examples;<br>
and ideally, make a fair comparison, so people can understand which<br>
projects may benefit more, and which may benefit less.</p>
<p>I don't mean to suggest too many benchmarks here, but perhaps at the least<br>
3 different examples, of a "small" project, a "medium" project, and a<br>
"large" project in ruby. And if it is not too much work, perhaps 5 projects,<br>
or even up to 8 or 10 - but I think 3-5 may suffice if it is somewhat<br>
representative.</p>
<p>The projects do not necessarily have to be that large, but perhaps picking<br>
some projects that require a few other projects would be realistic.</p>
<p>Some popular ruby projects could be picked, where comparison may make sense.<br>
"rack" may be a useful candidate here or perhaps a project that makes use<br>
of rack; perhaps a few more, such as "prawn", and similar projects.</p>
<p>The aim here is to provide ruby users with an overview that is somewhat<br>
accurate. (Since the jit optimizations may become better and faster in the<br>
future, I would also like to suggest to keep an entry in that documentat/file<br>
that states <strong>when the document was last updated</strong>.)</p>
<p>(3) As matz mentioned before that not all applications may benefit from the<br>
jit equally much, I would like to suggest to keep a short entry/paragraph<br>
that shows which applications may not benefit as much from jit too. Again,<br>
this does not have to be a long list; just a few examples, ideally with a<br>
benchmark. (These benchmarks could ideally also be automatically run.)</p>
<p>(4) After this basic information is made available, it may also be useful<br>
to explain a bit how the jit works (no need for any large technical details<br>
there; just a rough picture or overview how jit works), where it can optimize<br>
more code than in other ruby code; and perhaps also how to write "jit-friendly"<br>
code.</p>
<p>With "jit-friendly code", I do NOT mean that people write ruby code in order<br>
to maximize what the jit can do; but I assume that some code can be optimized<br>
more easily than other code, and it may be useful if people know these<br>
differences.</p>
<p>To explain this, I can provide an an example here:</p>
<p>I remember from the old pickaxe book, the difference between += and << for ruby<br>
Strings, with the latter being faster than += as it avoids creating/allocating<br>
new Strings. So I think this is a good recommendation for ruby Strings, to use<br>
<< if you want to append something, rather than +=.</p>
<p>Something similar in regards to jit may also be useful to have. Again, this does<br>
not have to be long; perhaps a paragraph or two.</p>
<p>(5) Links elsewhere should then be updated to refer to this jit-document too;<br>
the wiki here on bugs.ruby-lang.org should also have a link to this jit document<br>
perhaps; so should the official ruby homepage do, too - perhaps under "Documentation".</p>
<p>Perhaps also a file that is distributed with ruby itself can point to this jit<br>
document (or such a jit-file can also be distributed with ruby, but these are mostly<br>
details - in my opinion, the most important part is that there is one location where<br>
information about the jit is collected in an official way).</p>
<hr>
<p>I hope I could explain what I meant to say about the jit.</p>
<p>Please feel free to close this issue request here at any moment in time, for any<br>
reason; since the path to JIT may change up to ruby 3.x., I suggest to close this<br>
issue here at the very latest when ruby 3.x is released, or perhaps even earlier.</p>
<p>The 5 points are not all equally important; the two points (1) and (2) are the most<br>
important parts. The jit-code is more important than the documentation and should<br>
receive priority, but it would be nice if a bit of documentation could be added in<br>
the future about the jit from the "end user" perspective. This does not have to<br>
happn soon; think about this in the next ~18 months or so. I hope that this may<br>
be a realistic time frame for this.</p>
<p>Thank you for reading this suggestion!</p> Ruby master - Misc #15224 (Open): [DOCs] Minor inconsistency in class Array #initialize_copy - ht...https://redmine.ruby-lang.org/issues/152242018-10-13T10:18:57Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Today I looked at:</p>
<p><a href="https://ruby-doc.org/core-2.5.1/Array.html#method-i-initialize_copy" class="external">https://ruby-doc.org/core-2.5.1/Array.html#method-i-initialize_copy</a></p>
<p>The example to this method is this:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">a</span> <span class="o">=</span> <span class="p">[</span> <span class="s2">"a"</span><span class="p">,</span> <span class="s2">"b"</span><span class="p">,</span> <span class="s2">"c"</span><span class="p">,</span> <span class="s2">"d"</span><span class="p">,</span> <span class="s2">"e"</span> <span class="p">]</span>
<span class="n">a</span><span class="p">.</span><span class="nf">replace</span><span class="p">([</span> <span class="s2">"x"</span><span class="p">,</span> <span class="s2">"y"</span><span class="p">,</span> <span class="s2">"z"</span> <span class="p">])</span> <span class="c1">#=> ["x", "y", "z"]</span>
<span class="n">a</span> <span class="c1">#=> ["x", "y", "z"]</span>
</code></pre>
<p>What confused me was that I was looking at the method called <code>initialize_copy</code><br>
but the example showed <code>.replace()</code>.</p>
<p>I then looked at <code>#replace</code> there:</p>
<p><a href="https://ruby-doc.org/core-2.5.1/Array.html#method-i-replace" class="external">https://ruby-doc.org/core-2.5.1/Array.html#method-i-replace</a></p>
<p>And it was virtually identical to <code>initialize_copy</code>.</p>
<p>I assume the examples for <code>.replace()</code> are correct; and perhaps <code>initialize_copy</code><br>
is just an alias? I am not sure, but I would like to suggest to make the documentation,<br>
in particular the example, a bit more consistent.</p>
<p>When you click on "view source" to look at the C code, they show the very same<br>
content, so I believe that initialize_copy is merely an alias to replace; but I tried<br>
this and they are not fully equivalent:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">x</span> <span class="o">=</span> <span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span> <span class="c1"># => [1, 2, 3]</span>
<span class="n">x</span><span class="p">.</span><span class="nf">initialize_copy</span> <span class="p">[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">]</span>
</code></pre>
<pre><code>Traceback (most recent call last):
2: from /System/Index/bin/irb:11:in `<main>'
1: from (irb):2
NoMethodError (private method `initialize_copy' called for [1, 2, 3]:Array)
</code></pre>
<p>Yet:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">x</span><span class="p">.</span><span class="nf">replace</span> <span class="p">[</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">]</span> <span class="c1"># => [4, 5, 6]</span>
</code></pre>
<p>works. So I assume that <code>initialize_copy</code> is like <code>.replace()</code> but is a private<br>
method instead.</p>
<p>Perhaps it may help to add a sentence below the documentation of<br>
<code>replace()</code>, to explain what the use case for <code>initialize_copy</code> is. Or to perhaps<br>
mention that it is an alias.</p>
<p>At the least how it is right now is that people may read <code>initialize_copy</code>,<br>
but then see an example of <code>#replace</code>. (Perhaps an example for<br>
<code>initialize_copy</code> may help, but either way, I think the current docu-example<br>
is not ideal).</p> Ruby master - Feature #14565 (Open): Simpler, one-liner, failsafe require in ruby? [Suggested nam...https://redmine.ruby-lang.org/issues/145652018-03-01T17:48:05Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>I have quite a bit of code like this:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">begin</span>
<span class="nb">require</span> <span class="s1">'x/tools/cdrskin.rb'</span>
<span class="k">rescue</span> <span class="no">LoadError</span><span class="p">;</span> <span class="k">end</span>
</code></pre>
<p>I also use the longer variant, e.g.,</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">begin</span>
<span class="nb">require</span> <span class="s1">'foobar'</span>
<span class="k">rescue</span> <span class="no">LoadError</span>
<span class="nb">puts</span> <span class="s1">'project foobar is not available - consider '</span><span class="p">\</span>
<span class="s1">'installing it via gem install foobar'</span>
<span class="k">end</span>
</code></pre>
<p>Often, I do not need to inform the user about missing gems/projects that are tiny and not very important. In my larger ruby projects, I handle cases where a smaller project is not available or available, so I can proceed either way. It is a bit pointless to notify the user when that is me; that is why I would like to have a one-liner.</p>
<p>I am thinking of an API such as any of the following:</p>
<pre><code>require_failsafe
require_safe
require_try
require_add
</code></pre>
<p>This is for loading with a rescue LoadError without notification. If I need to notify a user then I am fine with the longer variant.</p>
<p>If anyone has better names, feel free to add them! I think people are more likely to remember the require-family, e. g. require 'foo.rb' or require_relative 'bar.rb' and so forth.</p>
<hr>
<p>I also wanted to propose a stronger <code>require</code>/<code>import</code>, including the possibility to refer to <code>.rb</code> files without a hardcoded path (if the .rb file is moved,<br>
all explicit requires to it, in particular from external projects, would have to change; and my vague idea is to replace this with some kind of project-specific way to<br>
"label" files and load these files based on these "labels", but that is for another suggestion; I only want to mention it because Hiroshi Shibata made some suggestion as extension to require, and I think the use case he mentioned may also be useful to see whether ruby may get a stronger "load code in files" functionality for ruby 3.x eventually).</p> Ruby master - Feature #14164 (Open): [Suggestion] Type system for ruby 3x to be usable for e. g. ...https://redmine.ruby-lang.org/issues/141642017-12-09T15:40:45Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello everyone, especially the ruby core team, nobu and of course matz,</p>
<p>This is an idea for ruby 3.x, but the idea is not ... well, really<br>
finished.</p>
<p>It is more of an idea.</p>
<p>As I am aware that working with "unfinished" ideas is not easy, please<br>
feel free to close this suggestion at any moment in time. It is more<br>
meant a bit to point towards what nobody else may have pointed out<br>
before ... :)</p>
<p>So the situation:</p>
<ul>
<li>Matz spoke a few times about a "type system" for ruby (3.x). Now, this<br>
can be anything really, but matz also specified his idea a few times.</li>
</ul>
<p>One idea that I think matz mentioned here or there was that it will be<br>
optional. That is, people can use ruby light-weight as always, without<br>
being forced into mandatory types and having to change the way they<br>
may have written ruby for the past x years.</p>
<p>There is one blog/interview entry here mentioning types as well, at:</p>
<p><a href="https://blog.heroku.com/ruby-3-by-3" class="external">https://blog.heroku.com/ruby-3-by-3</a></p>
<p>I think matz mentioned a type system a few times lateron when he gave<br>
a presentation, and he also commented on a few issues about the<br>
(possible) type system in different suggestions made at the ruby<br>
tracker here.</p>
<p>In particular, I remember that matz wrote something to a suggestion by<br>
another japanese ruby hacker some time ago about ... I think it had to<br>
do with specifying certain behaviour of objects/methods.</p>
<p>I am sorry that I can not describe this in more detail since I forgot<br>
the name of the one who suggested it; I myself do not fully understand<br>
or know what will come with ruby 3.x. The above URL to the blog/interview<br>
may give an indication as to what MIGHT come eventually.</p>
<p>Back then matz said:</p>
<p>"[...] the third major goal of the Ruby 3 is adding some kind of<br>
static typing while keeping the duck typing, so some kind of<br>
structure for soft-typing or something like that. The main goal<br>
of the type system is to detect errors early. So adding this<br>
kind of static type check or type interfaces does not affect<br>
runtime."</p>
<p>"It's just a compile time check. Maybe you can use that kind of<br>
information in IDEs so that the editors can use that data for their<br>
code completion or something like that, but not for performance<br>
improvement."</p>
<p>Ok, so far so good. Matz actually did not necessarily mean it<br>
for performance improvement per se.</p>
<p>But ... here I was thinking ...</p>
<p>I guess many ruby people know the programming language crystal or<br>
have heard about it. Matz even made a considerable donation a<br>
few years ago. :)</p>
<p>Crystal is in many ways similar to ruby; the syntax is somewhat<br>
similar (if we ignore the type system and macros perhaps).</p>
<p>Several ruby people use crystal, too, like jhass and others (I<br>
don't as of yet, largely due to lack of time, inertia and my<br>
own laziness; I even have learning elixir on my todo list and<br>
just did not get around it really).</p>
<p>However had, I somewhat jokingly said in the past that perhaps<br>
we could tune rubocop to generate crystal code. Since the difference<br>
should not be that far apart from ruby code.</p>
<p>It was more meant as a joke though, but ... I think in theory that<br>
could be possible, right? Perhaps not 100% valid crystal, but if<br>
you specify some layout guide for rubocop to conform too, then the<br>
autocorrect option from rubocop could perhaps generate a version<br>
that is very close to the final crystal variant, excluding types<br>
perhaps.</p>
<p>Not long ago, really just a few days ago, I actually remembered that<br>
ruby may have some form of (optional) typing system in the future.</p>
<p>And here I wondered:</p>
<ul>
<li>What if this type system could be used, in an optional way,<br>
for ruby people to also be able to auto-generate valid crystal<br>
code, via an indirection? This indirection could be rubocop,<br>
but it could also be part of MRI itself (once the type system<br>
is all in place; a bit like the RubyVM).</li>
</ul>
<p>I do not know how difficult this is but I thought that this<br>
would be pretty cool to have. Write Ruby - have Crystal. :D</p>
<p>(This is meant in addition; I myself obviously prefer to write<br>
ruby, and have the computer autogenerate crystal for me, so<br>
that I can be lazy. :P)</p>
<p>We could write ... ruby ... just as-is, for everyday scripts.</p>
<p>And then at a later time, we may add additional information, e. g.<br>
with any form of type system, IF we need it. And then, ruby<br>
could make use of that <em>additional</em> information to not only<br>
consider speeding up ruby code (perhaps; or perhaps not), but<br>
to also ... have it generate valid crystal code! :D</p>
<p>This is perhaps more wishful thinking on my part or for a<br>
future xmas list; and it may also require the crystal team<br>
to keep this in mind as well AND the ruby team.</p>
<p>But anyway, I only wanted to mention this for the time being;<br>
matz once mentioned that ruby 3.x is more aimed towards the<br>
year 2020, so ... +2 years I suppose, so there is still some<br>
time left before 3.x will be released and "finalized".</p>
<p>I do not know how the crystal team thinks, neither how the<br>
ruby team thinks about it - but I like my own idea. :D</p>
<p>Of course this also depends on what kind of type system there<br>
will be, and how useful it may be. In the design stage, naturally<br>
ruby comes first here (this is a bug tracker for ruby after all,<br>
not for other languages), but I wonder about the second step,<br>
where we could translate ruby-code into other languages code.</p>
<p>I should also note that I do not necessarily mean a "100%<br>
correct output where nobody has to make any changes"; I think<br>
any autogenerated output, that can be customized, would be<br>
a "time win" for people in general - both when it comes to<br>
having faster execution time for ruby code, but also lateron<br>
to anyone who may want to use crystal rather than ruby primarily<br>
because of the speed reason. (In my case, speed was never<br>
a reason to use ruby so I have no reason to switch away<br>
from ruby due to speed, but matz also said that nobody minds<br>
if things are fast, so any speed improvement is a good<br>
thing. And if my ruby code were to be almost valid crystal<br>
code, then I'd only have to invest a tiny bit extra time<br>
to get even more speed almost for free.)</p>
<p>Matz mentioned the additional information towards IDEs but<br>
we could perhaps combine this with other tools. For example,<br>
rubocop makes suggestions what to change; an optional type<br>
system could also perhaps make some kind of analysis as to<br>
what could be omitted or improved etc... a bit like the<br>
did-you-mean-gem but working on a more "sophisticated"<br>
level. (With a type system, I assume that a compiler has<br>
an easier time knowing which constraints can be used etc...)</p> Ruby master - Misc #14149 (Open): Ruby Birthday Thread - 25th years anniversaryhttps://redmine.ruby-lang.org/issues/141492017-12-02T01:07:30Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello Ruby-people in general,</p>
<p>Matz recently gave a keynote presentation and he mentioned that ruby's birthday will be<br>
in 2018 (25 years; I think matz mentioned that he counts when the name was chosen but<br>
ruby itself may have already been existing before that in one way or another perhaps).</p>
<p>I suggest that in this thread here, people can give feedback, give ideas, chat about<br>
things ... the party will be in Japan though, so not everyone can participate. :D</p>
<p>However had, as this here can be a thread where people can "virtually" add/contribute<br>
anything, I thought that it may be a good idea to start a thread here.</p>
<p>In order to not have this thread be active for too long, I suggest that it should<br>
be closed some time in 2018, after the ruby birthday party. :D</p>
<p>(I think the official birthday will be around February 2018, so I suggest that<br>
this thread should perhaps "fade out" some time in June or July 2018 or so?<br>
Something like that perhaps, but do feel free to ignore this too when appropriate,<br>
it is just a suggestion.)</p>
<p>I'll start with some feedback next from my point of view, but this thread should be<br>
general, not "just" my opinion. People really should give feedback, matz said so<br>
specifically in the keynote presentation.</p> Ruby master - Bug #14081 (Closed): Compile failure in "make install" step, at "stringio"https://redmine.ruby-lang.org/issues/140812017-11-05T10:29:27Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello Ruby core team and everyone else,</p>
<p>I am not sure if this was already reported or not, but I will<br>
report it now, just to be safe.</p>
<p>I have a self-compiled ruby, from the URL:</p>
<p><a href="ftp://ftp.ruby-lang.org/pub/ruby/2.4/ruby-2.4.2.tar.xz" class="external">ftp://ftp.ruby-lang.org/pub/ruby/2.4/ruby-2.4.2.tar.xz</a></p>
<p>This ruby resides under /Programs/Ruby/2.4.2/ and it works<br>
very well.</p>
<p>Now I am trying to compile a new ruby using this configure<br>
line:</p>
<pre><code>./configure --prefix=/usr
</code></pre>
<p>This fails at "stringio" during the "make install" step.</p>
<p>Following is the error:</p>
<p>./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --enable-debug-env --enable-load-relative --enable-frozen-string-literal-debug --enable-pthread --enable-shared --with-ext=readline,openssl,+ --disable-install-capi --disable-install-doc --disable-install-rdoc</p>
<h2>checking for ruby... /System/Index/bin//ruby<br>
config.guess already exists<br>
config.sub already exists<br>
checking build system type...<br>
x86_64-pc-linux-gnu<br>
checking host system type... x86_64-pc-linux-gnu<br>
checking target system type... x86_64-pc-linux-gnu<br>
checking for gcc... gcc<br>
checking whether the C compiler works... yes<br>
checking for C compiler default output file name... a.out<br>
checking for suffix of executables...<br>
checking whether we are cross compiling... mno<br>
checking for suffix of object files... o<br>
checking whether we are using the GNU C compiler... yes<br>
checking whether gcc accepts -g... ayes<br>
checking for gcc option to accept ISO C89... none needed<br>
checking for g++... g++<br>
checking whether we are using the GNU C++ compiler... kyes<br>
checking whether g++ accepts -g... yes<br>
checking how to run the C preprocessor... egcc -E<br>
checking for grep that handles long lines and -e... /System/Index/bin//grep<br>
checking for egrep... /System/Index/bin//grep -E<br>
checking whether gcc needs -traditional... no<br>
checking for ld... ld<br>
checking whether the linker is GNU ld... yes<br>
checking whether gcc -E accepts -o... yes<br>
checking for ranlib... ranlib<br>
checking for ar... ar<br>
checking for ar D option... yes<br>
checking for as... as<br>
checking for objdump... objdump<br>
checking for objcopy... objcopy<br>
checking for nm... nm<br>
checking whether ln -s works... yes<br>
checking whether make sets $(MAKE)... yes<br>
checking for a BSD-compatible install... /System/Index/bin//install -c<br>
checking for a thread-safe mkdir -p... /System/Index/bin//mkdir -p<br>
checking for dtrace... dtrace<br>
checking for dot... dot<br>
checking for doxygen... doxygen<br>
checking for pkg-config... pkg-config<br>
checking for ANSI C header files... yes<br>
checking for sys/types.h... yes<br>
checking for sys/stat.h... yes<br>
checking for stdlib.h... yes<br>
checking for string.h... yes<br>
checking for memory.h... yes<br>
checking for strings.h... yes<br>
checking for inttypes.h... yes<br>
checking for stdint.h... yes<br>
checking for unistd.h... yes<br>
checking minix/config.h usability... no<br>
checking minix/config.h presence... no<br>
checking for minix/config.h... no<br>
checking whether it is safe to define <strong>EXTENSIONS</strong>... yes<br>
checking for cd using physical directory... cd -P<br>
checking whether CFLAGS is valid... yes<br>
checking whether LDFLAGS is valid... yes<br>
checking whether -Wl,-R. is accepted as LDFLAGS... yes<br>
checking whether -Wl,-rpath,. is accepted as LDFLAGS... yes<br>
checking whether -Wno-unused-parameter is accepted as CFLAGS... yes<br>
checking whether -Wno-parentheses is accepted as CFLAGS... yes<br>
checking whether -Wno-long-long is accepted as CFLAGS... yes<br>
checking whether -diag-disable=2259 is accepted as CFLAGS... no<br>
checking whether -Wno-missing-field-initializers is accepted as CFLAGS... yes<br>
checking whether -Wno-tautological-compare is accepted as CFLAGS... yes<br>
checking whether -Wno-parentheses-equality is accepted as CFLAGS... yes<br>
checking whether -Wno-constant-logical-operand is accepted as CFLAGS... yes<br>
checking whether -Wno-self-assign is accepted as CFLAGS... yes<br>
checking whether -Wunused-variable is accepted as CFLAGS... yes<br>
checking whether -Wimplicit-int is accepted as CFLAGS... yes<br>
checking whether -Wpointer-arith is accepted as CFLAGS... yes<br>
checking whether -Wwrite-strings is accepted as CFLAGS... yes<br>
checking whether -Wdeclaration-after-statement is accepted as CFLAGS... yes<br>
checking whether -Wshorten-64-to-32 is accepted as CFLAGS... no<br>
checking whether -Wimplicit-function-declaration is accepted as CFLAGS... yes<br>
checking whether -Wdivision-by-zero is accepted as CFLAGS... no<br>
checking whether -Wdeprecated-declarations is accepted as CFLAGS... yes<br>
checking whether -Wno-packed-bitfield-compat is accepted as CFLAGS... yes<br>
checking whether -Wsuggest-attribute=noreturn is accepted as CFLAGS... yes<br>
checking whether -Wsuggest-attribute=format is accepted as CFLAGS... yes<br>
checking whether -Wimplicit-fallthrough=0 is accepted as CFLAGS... yes<br>
checking whether -Wextra-tokens is accepted as CFLAGS... no<br>
checking whether -Wall -Wextra is accepted as CFLAGS... yes<br>
checking whether -Qunused-arguments is accepted as CFLAGS... no<br>
checking whether INFINITY is available without C99 option... yes<br>
checking whether NAN is available without C99 option... yes<br>
checking whether -D_FORTIFY_SOURCE=2 is accepted as CFLAGS... yes<br>
checking whether -fstack-protector is accepted as CFLAGS... yes<br>
checking whether -fstack-protector is accepted as LDFLAGS... yes<br>
checking whether -Wl,--compress-debug-sections=zlib is accepted as LDFLAGS... yes<br>
checking whether -std=gnu99 is accepted as CFLAGS... yes<br>
checking whether -fno-strict-overflow is accepted as CFLAGS... yes<br>
checking whether -ggdb3 is accepted as CFLAGS... yes<br>
checking whether -fvisibility=hidden is accepted as CFLAGS... yes<br>
checking whether -fno-fast-math is accepted as CFLAGS... yes<br>
checking whether -fexcess-precision=standard is accepted as CFLAGS... yes<br>
checking whether -fp-model precise is accepted as CFLAGS... no<br>
checking for crypt in -lcrypt... yes<br>
checking for dlopen in -ldl... yes<br>
checking for shl_load in -ldld... no<br>
checking for shutdown in -lsocket... no<br>
checking for dirent.h that defines DIR... yes<br>
checking for library containing opendir... none required<br>
checking for stdbool.h that conforms to C99... yes<br>
checking for _Bool... yes<br>
checking for sys/wait.h that is POSIX.1 compatible... yes<br>
checking a.out.h usability... yes<br>
checking a.out.h presence... yes<br>
checking for a.out.h... yes<br>
checking atomic.h usability... no<br>
checking atomic.h presence... no<br>
checking for atomic.h... no<br>
checking direct.h usability... no<br>
checking direct.h presence... no<br>
checking for direct.h... no<br>
checking grp.h usability... yes<br>
checking grp.h presence... yes<br>
checking for grp.h... yes<br>
checking fcntl.h usability... yes<br>
checking fcntl.h presence... yes<br>
checking for fcntl.h... yes<br>
checking float.h usability... yes<br>
checking float.h presence... yes<br>
checking for float.h... yes<br>
checking ieeefp.h usability... no<br>
checking ieeefp.h presence... no<br>
checking for ieeefp.h... no<br>
checking intrinsics.h usability... no<br>
checking intrinsics.h presence... no<br>
checking for intrinsics.h... no<br>
checking langinfo.h usability... yes<br>
checking langinfo.h presence... yes<br>
checking for langinfo.h... yes<br>
checking limits.h usability... yes<br>
checking limits.h presence... yes<br>
checking for limits.h... yes<br>
checking locale.h usability... yes<br>
checking locale.h presence... yes<br>
checking for locale.h... yes<br>
checking malloc.h usability... yes<br>
checking malloc.h presence... yes<br>
checking for malloc.h... yes<br>
checking malloc/malloc.h usability... no<br>
checking malloc/malloc.h presence... no<br>
checking for malloc/malloc.h... no<br>
checking malloc_np.h usability... no<br>
checking malloc_np.h presence... no<br>
checking for malloc_np.h... no<br>
checking net/socket.h usability... no<br>
checking net/socket.h presence... no<br>
checking for net/socket.h... no<br>
checking process.h usability... no<br>
checking process.h presence... no<br>
checking for process.h... no<br>
checking pwd.h usability... yes<br>
checking pwd.h presence... yes<br>
checking for pwd.h... yes<br>
checking setjmpex.h usability... no<br>
checking setjmpex.h presence... no<br>
checking for setjmpex.h... no<br>
checking sys/attr.h usability... no<br>
checking sys/attr.h presence... no<br>
checking for sys/attr.h... no<br>
checking sys/fcntl.h usability... yes<br>
checking sys/fcntl.h presence... yes<br>
checking for sys/fcntl.h... yes<br>
checking sys/file.h usability... yes<br>
checking sys/file.h presence... yes<br>
checking for sys/file.h... yes<br>
checking sys/id.h usability... no<br>
checking sys/id.h presence... no<br>
checking for sys/id.h... no<br>
checking sys/ioctl.h usability... yes<br>
checking sys/ioctl.h presence... yes<br>
checking for sys/ioctl.h... yes<br>
checking sys/mkdev.h usability... no<br>
checking sys/mkdev.h presence... no<br>
checking for sys/mkdev.h... no<br>
checking sys/param.h usability... yes<br>
checking sys/param.h presence... yes<br>
checking for sys/param.h... yes<br>
checking sys/prctl.h usability... yes<br>
checking sys/prctl.h presence... yes<br>
checking for sys/prctl.h... yes<br>
checking sys/resource.h usability... yes<br>
checking sys/resource.h presence... yes<br>
checking for sys/resource.h... yes<br>
checking sys/select.h usability... yes<br>
checking sys/select.h presence... yes<br>
checking for sys/select.h... yes<br>
checking sys/sendfile.h usability... yes<br>
checking sys/sendfile.h presence... yes<br>
checking for sys/sendfile.h... yes<br>
checking sys/socket.h usability... yes<br>
checking sys/socket.h presence... yes<br>
checking for sys/socket.h... yes<br>
checking sys/syscall.h usability... yes<br>
checking sys/syscall.h presence... yes<br>
checking for sys/syscall.h... yes<br>
checking sys/sysmacros.h usability... yes<br>
checking sys/sysmacros.h presence... yes<br>
checking for sys/sysmacros.h... yes<br>
checking sys/time.h usability... yes<br>
checking sys/time.h presence... yes<br>
checking for sys/time.h... yes<br>
checking sys/times.h usability... yes<br>
checking sys/times.h presence... yes<br>
checking for sys/times.h... yes<br>
checking sys/uio.h usability... yes<br>
checking sys/uio.h presence... yes<br>
checking for sys/uio.h... yes<br>
checking sys/utime.h usability... no<br>
checking sys/utime.h presence... no<br>
checking for sys/utime.h... no<br>
checking syscall.h usability... yes<br>
checking syscall.h presence... yes<br>
checking for syscall.h... yes<br>
checking time.h usability... yes<br>
checking time.h presence... yes<br>
checking for time.h... yes<br>
checking ucontext.h usability... yes<br>
checking ucontext.h presence... yes<br>
checking for ucontext.h... yes<br>
checking utime.h usability... yes<br>
checking utime.h presence... yes<br>
checking for utime.h... yes<br>
checking gmp.h usability... yes<br>
checking gmp.h presence... yes<br>
checking for gmp.h... yes<br>
checking for library containing __gmpz_init... -lgmp<br>
checking for special C compiler options needed for large files... no<br>
checking for _FILE_OFFSET_BITS value needed for large files... no<br>
checking whether byte ordering is bigendian... no<br>
checking for an ANSI C-conforming const... yes<br>
checking whether char is unsigned... no<br>
checking for inline... inline<br>
checking for working volatile... yes<br>
checking for typeof syntax and keyword spelling... typeof<br>
checking for long long... yes<br>
checking for off_t... yes<br>
checking char bit... 8<br>
checking size of int... 4<br>
checking size of short... 2<br>
checking size of long... 8<br>
checking size of long long... 8<br>
checking size of __int64... 0<br>
checking size of __int128... 16<br>
checking size of off_t... 8<br>
checking size of void*... 8<br>
checking size of float... 4<br>
checking size of double... 8<br>
checking size of time_t... 8<br>
checking size of clock_t... 8<br>
checking packed struct attribute... x <strong>attribute</strong>((packed))<br>
checking for printf prefix for long long... ll<br>
checking for pid_t... yes<br>
checking for convertible type of pid_t... INT<br>
checking for uid_t... yes<br>
checking for convertible type of uid_t... UINT<br>
checking for gid_t... yes<br>
checking for convertible type of gid_t... UINT<br>
checking for time_t... yes<br>
checking for convertible type of time_t... LONG<br>
checking for dev_t... yes<br>
checking for convertible type of dev_t... ULONG<br>
checking for mode_t... yes<br>
checking for convertible type of mode_t... UINT<br>
checking for rlim_t... yes<br>
checking for convertible type of rlim_t... ULONG<br>
checking for off_t... (cached) yes<br>
checking for convertible type of off_t... LONG<br>
checking for clockid_t... yes<br>
checking for convertible type of clockid_t... INT<br>
checking for prototypes... yes<br>
checking token paste string... ansi<br>
checking stringization... #expr<br>
checking string literal concatenation... yes<br>
checking for variable length prototypes and stdarg.h... yes<br>
checking for variable length macro... yes<br>
checking for CONSTFUNC function attribute... <strong>attribute</strong> ((<strong>const</strong>)) x<br>
checking for PUREFUNC function attribute... <strong>attribute</strong> ((<strong>pure</strong>)) x<br>
checking for NORETURN function attribute... <strong>attribute</strong> ((<strong>noreturn</strong>)) x<br>
checking for DEPRECATED function attribute... <strong>attribute</strong> ((<strong>deprecated</strong>)) x<br>
checking for DEPRECATED_BY function attribute... <strong>attribute</strong> ((<strong>deprecated</strong>("by "#n))) x<br>
checking for DEPRECATED_TYPE type attribute... <strong>attribute</strong> ((<strong>deprecated</strong> mesg)) x<br>
checking for NOINLINE function attribute... <strong>attribute</strong> ((<strong>noinline</strong>)) x<br>
checking for ALWAYS_INLINE function attribute... <strong>attribute</strong> ((<strong>always_inline</strong>)) x<br>
checking for WARN_UNUSED_RESULT function attribute... <strong>attribute</strong> ((<strong>warn_unused_result</strong>)) x<br>
checking for MAYBE_UNUSED function attribute... <strong>attribute</strong> ((<strong>unused</strong>)) x<br>
checking for ERRORFUNC function attribute... <strong>attribute</strong> ((<strong>error</strong> mesg)) x<br>
checking for WARNINGFUNC function attribute... <strong>attribute</strong> ((<strong>warning</strong> mesg)) x<br>
checking for WEAK function attribute... <strong>attribute</strong> ((<strong>weak</strong>)) x<br>
checking for FUNC_STDCALL function attribute... x<br>
checking for FUNC_CDECL function attribute... x<br>
checking for FUNC_FASTCALL function attribute... x<br>
checking for FUNC_UNOPTIMIZED function attribute... <strong>attribute</strong> ((<strong>optimize</strong>("O0"))) x<br>
checking for FUNC_MINIMIZED function attribute... <strong>attribute</strong> ((<strong>optimize</strong>("-Os","-fomit-frame-pointer"))) x<br>
checking for function alias... alias<br>
checking for __atomic builtins... yes<br>
checking for __sync builtins... yes<br>
checking for __builtin_unreachable... yes<br>
checking for exported function attribute... <strong>attribute</strong> ((<strong>visibility</strong>("default")))<br>
checking for function name string predefined identifier... <strong>func</strong><br>
checking if enum over int is allowed... yes<br>
checking whether sys_nerr is declared... yes<br>
checking whether getenv is declared... yes<br>
checking for size_t... yes<br>
checking size of size_t... 8<br>
checking size of ptrdiff_t... 8<br>
checking for printf prefix for size_t... z<br>
checking for printf prefix for ptrdiff_t... t<br>
checking for struct stat.st_blksize... yes<br>
checking for struct stat.st_blocks... yes<br>
checking for struct stat.st_rdev... yes<br>
checking size of struct stat.st_size... SIZEOF_OFF_T<br>
checking size of struct stat.st_blocks... SIZEOF_OFF_T<br>
checking size of struct stat.st_ino... SIZEOF_LONG<br>
checking for struct stat.st_atim... yes<br>
checking for struct stat.st_atimespec... no<br>
checking for struct stat.st_atimensec... no<br>
checking for struct stat.st_mtim... yes<br>
checking for struct stat.st_mtimespec... no<br>
checking for struct stat.st_mtimensec... no<br>
checking for struct stat.st_ctim... yes<br>
checking for struct stat.st_ctimespec... no<br>
checking for struct stat.st_ctimensec... no<br>
checking for struct stat.st_birthtimespec... no<br>
checking for struct timeval... yes<br>
checking size of struct timeval.tv_sec... SIZEOF_TIME_T<br>
checking for struct timespec... yes<br>
checking for struct timezone... yes<br>
checking for clockid_t... (cached) yes<br>
checking for fd_mask... yes<br>
checking for int8_t... yes<br>
checking size of int8_t... 1<br>
checking for uint8_t... yes<br>
checking size of uint8_t... 1<br>
checking for int16_t... yes<br>
checking size of int16_t... 2<br>
checking for uint16_t... yes<br>
checking size of uint16_t... 2<br>
checking for int32_t... yes<br>
checking size of int32_t... 4<br>
checking for uint32_t... yes<br>
checking size of uint32_t... 4<br>
checking for int64_t... yes<br>
checking size of int64_t... 8<br>
checking for uint64_t... yes<br>
checking size of uint64_t... 8<br>
checking for int128_t... __int128<br>
checking for uint128_t... unsigned __int128<br>
checking for intptr_t... yes<br>
checking size of intptr_t... 8<br>
checking for uintptr_t... yes<br>
checking size of uintptr_t... 8<br>
checking for ssize_t... yes<br>
checking size of ssize_t... 8<br>
checking for stack end address... __libc_stack_end<br>
checking for uid_t in sys/types.h... (cached) yes<br>
checking type of array argument to getgroups... gid_t<br>
checking return type of signal handlers... void<br>
checking for working alloca.h... yes<br>
checking for alloca... yes<br>
checking for dynamic size alloca... ok<br>
checking for working memcmp... yes<br>
checking for broken erfc of glibc-2.3.6 on IA64... no<br>
checking for acosh... yes<br>
checking for cbrt... yes<br>
checking for crypt... yes<br>
checking for dup2... yes<br>
checking for erf... yes<br>
checking for explicit_bzero... no<br>
checking for ffs... yes<br>
checking for finite... yes<br>
checking for flock... yes<br>
checking for hypot... yes<br>
checking for isinf... yes<br>
checking for isnan... yes<br>
checking for lgamma_r... yes<br>
checking for memmove... yes<br>
checking for nextafter... yes<br>
checking for setproctitle... no<br>
checking for strchr... yes<br>
checking for strerror... yes<br>
checking for strlcat... no<br>
checking for strlcpy... no<br>
checking for strstr... yes<br>
checking for tgamma... yes<br>
checking sys/pstat.h usability... no<br>
checking sys/pstat.h presence... no<br>
checking for sys/pstat.h... no<br>
checking for signbit... yes<br>
checking for broken memmem... no<br>
checking for pid_t... (cached) yes<br>
checking vfork.h usability... no<br>
checking vfork.h presence... no<br>
checking for vfork.h... no<br>
checking for fork... yes<br>
checking for vfork... yes<br>
checking for working fork... yes<br>
checking for working vfork... (cached) yes<br>
checking for __syscall... no<br>
checking for _longjmp... yes<br>
checking for arc4random_buf... no<br>
checking for atan2l... yes<br>
checking for atan2f... yes<br>
checking for chroot... yes<br>
checking for chsize... no<br>
checking for clock_gettime... yes<br>
checking for cosh... yes<br>
checking for crypt_r... yes<br>
checking for daemon... (cached) no<br>
checking for dirfd... yes<br>
checking for dl_iterate_phdr... yes<br>
checking for dlopen... yes<br>
checking for dladdr... yes<br>
checking for dup... yes<br>
checking for dup3... yes<br>
checking for eaccess... yes<br>
checking for endgrent... yes<br>
checking for fchmod... yes<br>
checking for fchown... yes<br>
checking for fcntl... yes<br>
checking for fdatasync... yes<br>
checking for fgetattrlist... no<br>
checking for fmod... yes<br>
checking for fsync... yes<br>
checking for ftruncate... yes<br>
checking for ftruncate64... yes<br>
checking for getattrlist... no<br>
checking for getcwd... yes<br>
checking for getgidx... no<br>
checking for getgrnam... yes<br>
checking for getgrnam_r... yes<br>
checking for getgroups... yes<br>
checking for getpgid... yes<br>
checking for getpgrp... yes<br>
checking for getpriority... yes<br>
checking for getpwnam_r... yes<br>
checking for getresgid... yes<br>
checking for getresuid... yes<br>
checking for getrlimit... yes<br>
checking for getsid... yes<br>
checking for gettimeofday... yes<br>
checking for getuidx... no<br>
checking for gmtime_r... yes<br>
checking for initgroups... yes<br>
checking for ioctl... yes<br>
checking for isfinite... no<br>
checking for issetugid... no<br>
checking for killpg... yes<br>
checking for lchmod... no<br>
checking for lchown... yes<br>
checking for link... yes<br>
checking for llabs... yes<br>
checking for lockf... yes<br>
checking for log2... yes<br>
checking for lstat... yes<br>
checking for malloc_usable_size... yes<br>
checking for malloc_size... no<br>
checking for mblen... yes<br>
checking for memalign... yes<br>
checking for memset_s... no<br>
checking for writev... yes<br>
checking for memrchr... yes<br>
checking for memmem... yes<br>
checking for mkfifo... yes<br>
checking for mknod... yes<br>
checking for mktime... yes<br>
checking for pipe2... yes<br>
checking for poll... yes<br>
checking for posix_fadvise... yes<br>
checking for posix_memalign... yes<br>
checking for ppoll... yes<br>
checking for pread... yes<br>
checking for qsort_r... yes<br>
checking for qsort_s... no<br>
checking for readlink... yes<br>
checking for round... yes<br>
checking for sched_getaffinity... yes<br>
checking for seekdir... yes<br>
checking for select_large_fdset... no<br>
checking for sendfile... yes<br>
checking for setegid... yes<br>
checking for setenv... yes<br>
checking for seteuid... yes<br>
checking for setgid... yes<br>
checking for setgroups... yes<br>
checking for setpgid... yes<br>
checking for setpgrp... yes<br>
checking for setregid... yes<br>
checking for setresgid... yes<br>
checking for setresuid... yes<br>
checking for setreuid... yes<br>
checking for setrgid... no<br>
checking for setrlimit... yes<br>
checking for setruid... no<br>
checking for setsid... yes<br>
checking for setuid... yes<br>
checking for shutdown... yes<br>
checking for sigaction... yes<br>
checking for sigaltstack... yes<br>
checking for sigprocmask... yes<br>
checking for sinh... yes<br>
checking for spawnv... no<br>
checking for symlink... yes<br>
checking for syscall... yes<br>
checking for sysconf... yes<br>
checking for tanh... yes<br>
checking for telldir... yes<br>
checking for timegm... yes<br>
checking for times... yes<br>
checking for truncate... yes<br>
checking for truncate64... yes<br>
checking for unsetenv... yes<br>
checking for utimensat... yes<br>
checking for utimes... yes<br>
checking for wait4... yes<br>
checking for waitpid... yes<br>
checking if getcwd allocates buffer if NULL is given... yes<br>
checking crypt.h usability... yes<br>
checking crypt.h presence... yes<br>
checking for crypt.h... yes<br>
checking for struct crypt_data.initialized... yes<br>
checking for __builtin_bswap16... yes<br>
checking for __builtin_bswap32... yes<br>
checking for __builtin_bswap64... yes<br>
checking for __builtin_popcount... yes<br>
checking for __builtin_popcountll... yes<br>
checking for __builtin_clz... yes<br>
checking for __builtin_clzl... yes<br>
checking for __builtin_clzll... yes<br>
checking for __builtin_ctz... yes<br>
checking for __builtin_ctzll... yes<br>
checking for __builtin_constant_p... yes<br>
checking for __builtin_choose_expr... yes<br>
checking for __builtin_choose_expr_constant_p... yes<br>
checking for __builtin_types_compatible_p... yes<br>
checking whether qsort_r is GNU version... yes<br>
checking whether qsort_r is BSD version... no<br>
checking whether atan2 handles Inf as C99... yes<br>
checking whether lgamma_r handles +0.0 and -0.0... yes<br>
checking for clock_getres... yes<br>
checking for unsetenv returns a value... yes<br>
checking whether struct tm is in sys/time.h or time.h... time.h<br>
checking for struct tm.tm_zone... yes<br>
checking for struct tm.tm_gmtoff... yes<br>
checking for external int daylight... yes<br>
checking for external timezone... long<br>
checking for external altzone... no<br>
checking for timezone... yes<br>
checking whether timezone requires zero arguments... yes<br>
checking for negative time_t for gmtime(3)... yes<br>
checking for localtime(3) overflow correctly... yes<br>
checking for sig_t... yes<br>
checking whether right shift preserve sign bit... yes<br>
checking whether _SC_CLK_TCK is supported... yes<br>
checking stack growing direction on x86_64... -1<br>
checking for pthread_kill in -lthr... no<br>
checking for pthread_kill in -lpthread... yes<br>
checking for pthread_np.h... no<br>
checking whether pthread_t is scalar type... yes<br>
checking for sched_yield... yes<br>
checking for pthread_attr_setinheritsched... yes<br>
checking for pthread_attr_get_np... no<br>
checking for pthread_attr_getstack... yes<br>
checking for pthread_get_stackaddr_np... no<br>
checking for pthread_get_stacksize_np... no<br>
checking for thr_stksegment... no<br>
checking for pthread_stackseg_np... no<br>
checking for pthread_getthrds_np... no<br>
checking for pthread_cond_init... yes<br>
checking for pthread_condattr_setclock... yes<br>
checking for pthread_condattr_init... yes<br>
checking for pthread_sigmask... yes<br>
checking for pthread_setname_np... yes<br>
checking for pthread_set_name_np... no<br>
checking for pthread_getattr_np... yes<br>
checking for pthread_attr_init... yes<br>
checking arguments of pthread_setname_np... (pthread_self(), name)<br>
checking if mcontext_t is a pointer... no<br>
checking for getcontext... yes<br>
checking for setcontext... yes<br>
checking if fork works with pthread... yes<br>
checking whether ELF binaries are produced... yes<br>
checking elf.h usability... yes<br>
checking elf.h presence... yes<br>
checking for elf.h... yes<br>
checking elf_abi.h usability... no<br>
checking elf_abi.h presence... no<br>
checking for elf_abi.h... no<br>
checking whether OS depend dynamic link works... yes<br>
checking for backtrace... yes<br>
checking for broken backtrace... no<br>
checking valgrind/memcheck.h usability... no<br>
checking valgrind/memcheck.h presence... no<br>
checking for valgrind/memcheck.h... no<br>
checking for strip... strip<br>
checking whether -Wl,--no-undefined is accepted as LDFLAGS... yes<br>
checking whether wrapper for LD_LIBRARY_PATH is needed... no<br>
checking whether dtrace USDT is available... no<br>
checking for __builtin_setjmp... yes with cast ()<br>
checking for _setjmpex as a macro or function... no<br>
checking for _setjmp as a macro or function... yes<br>
checking for sigsetjmp as a macro or function... no<br>
checking for setjmp type... __builtin_setjmp<br>
checking for prefix of external symbols... NONE<br>
checking pthread.h usability... yes<br>
checking pthread.h presence... yes<br>
checking for pthread.h... yes<br>
checking if make is GNU make... yes<br>
checking for nroff... /usr/bin/nroff<br>
.ext/include/x86_64-linux/ruby/config.h unchanged<br>
configure: ruby library version = 2.4.0<br>
configure: creating ./config.status<br>
config.status: creating GNUmakefile<br>
config.status: creating Makefile<br>
config.status: creating ruby-2.4.pc</h2>
<p>Configuration summary for ruby version 2.4.2</p>
<ul>
<li>Installation prefix: /usr</li>
<li>exec prefix: ${prefix}</li>
<li>arch: x86_64-linux</li>
<li>site arch: ${arch}</li>
<li>RUBY_BASE_NAME: ruby</li>
<li>enable shared: yes</li>
<li>ruby lib prefix: ${libdir}/${RUBY_BASE_NAME}</li>
<li>site libraries path: ${rubylibprefix}/${sitearch}</li>
<li>vendor path: ${rubylibprefix}/vendor_ruby</li>
<li>target OS: linux</li>
<li>compiler: gcc</li>
<li>with pthread: yes</li>
<li>enable shared libs: yes</li>
<li>dynamic library ext: so</li>
<li>CFLAGS: ${optflags} ${debugflags} ${warnflags}</li>
<li>LDFLAGS: -L. -fstack-protector -rdynamic <br>
-Wl,-export-dynamic</li>
<li>optflags: -O3 -fno-fast-math</li>
<li>debugflags: -ggdb3</li>
<li>warnflags: -Wall -Wextra -Wno-unused-parameter <br>
-Wno-parentheses -Wno-long-long <br>
-Wno-missing-field-initializers <br>
-Wno-tautological-compare <br>
-Wno-parentheses-equality <br>
-Wno-constant-logical-operand -Wno-self-assign <br>
-Wunused-variable -Wimplicit-int -Wpointer-arith <br>
-Wwrite-strings -Wdeclaration-after-statement <br>
-Wimplicit-function-declaration <br>
-Wdeprecated-declarations <br>
-Wno-packed-bitfield-compat <br>
-Wsuggest-attribute=noreturn <br>
-Wsuggest-attribute=format <br>
-Wimplicit-fallthrough=0</li>
<li>strip command: strip -S -x</li>
<li>install doc: no</li>
<li>man page type: doc</li>
</ul>
<hr>
<p>/Depot/jjjj/ruby-2.4.2/<br>
/Depot/jjjj/ruby-2.4.2/make</p>
<p>gcc (GCC) 7.2.0<br>
Copyright (C) 2017 Free Software Foundation, Inc.<br>
This is free software; see the source for copying conditions. There is NO<br>
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
<p>making dummy probes.h<br>
file2lastrev.rb: does not seem to be under a vcs: .<br>
make: [uncommon.mk:903: .revision.time] Error 1 (ignored)<br>
./revision.h unchanged<br>
compiling main.c<br>
compiling dmydln.c<br>
compiling miniinit.c<br>
compiling dmyext.c<br>
compiling miniprelude.c<br>
compiling array.c<br>
compiling bignum.c<br>
compiling class.c<br>
compiling compar.c<br>
compiling compile.c<br>
In function 'iseq_build_kw.isra.68',<br>
inlined from 'rb_iseq_build_from_ary' at compile.c:6991:30:<br>
compile.c:6892:9: warning: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]<br>
dvs = ALLOC_N(VALUE, default_len);<br>
In file included from ./include/ruby/ruby.h:36:0,<br>
from ./include/ruby.h:33,<br>
from internal.h:15,<br>
from compile.c:12:<br>
compile.c: In function 'rb_iseq_build_from_ary':<br>
./include/ruby/defines.h:184:18: note: in a call to allocation function 'ruby_xmalloc2' declared here<br>
#define xmalloc2 ruby_xmalloc2<br>
^<br>
./include/ruby/defines.h:197:7: note: in expansion of macro 'xmalloc2'<br>
void *xmalloc2(size_t,size_t) RUBY_ATTR_ALLOC_SIZE((1,2));<br>
^~~~~~~~<br>
compiling complex.c<br>
compiling cont.c<br>
compiling debug.c<br>
compiling dir.c<br>
compiling dln_find.c<br>
compiling encoding.c<br>
compiling enum.c<br>
compiling enumerator.c<br>
compiling error.c<br>
compiling eval.c<br>
compiling file.c<br>
compiling gc.c<br>
compiling hash.c<br>
compiling inits.c<br>
compiling io.c<br>
compiling iseq.c<br>
compiling load.c<br>
compiling marshal.c<br>
compiling math.c<br>
compiling node.c<br>
compiling numeric.c<br>
compiling object.c<br>
compiling pack.c<br>
compiling parse.c<br>
compiling proc.c<br>
compiling process.c<br>
compiling random.c<br>
compiling range.c<br>
compiling rational.c<br>
compiling re.c<br>
compiling regcomp.c<br>
compiling regenc.c<br>
compiling regerror.c<br>
compiling regexec.c<br>
compiling regparse.c<br>
compiling regsyntax.c<br>
compiling ruby.c<br>
compiling safe.c<br>
compiling signal.c<br>
compiling sprintf.c<br>
compiling st.c<br>
compiling strftime.c<br>
compiling string.c<br>
compiling struct.c<br>
compiling symbol.c<br>
compiling thread.c<br>
compiling time.c<br>
compiling transcode.c<br>
compiling util.c<br>
compiling variable.c<br>
compiling version.c<br>
compiling vm.c<br>
compiling vm_backtrace.c<br>
compiling vm_dump.c<br>
compiling vm_trace.c<br>
compiling enc/ascii.c<br>
compiling enc/us_ascii.c<br>
compiling enc/unicode.c<br>
compiling enc/utf_8.c<br>
compiling enc/trans/newline.c<br>
compiling ./missing/explicit_bzero.c<br>
compiling ./missing/setproctitle.c<br>
compiling ./missing/strlcat.c<br>
compiling ./missing/strlcpy.c<br>
compiling addr2line.c<br>
compiling dmyenc.c<br>
linking miniruby<br>
generating encdb.h<br>
encdb.h updated<br>
./tool/ifchange "--timestamp=.rbconfig.time" rbconfig.rb rbconfig.tmp<br>
rbconfig.rb updated<br>
generating enc.mk<br>
making srcs under enc<br>
make[1]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
make[1]: Nothing to be done for 'srcs'.<br>
make[1]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
generating transdb.h<br>
transdb.h updated<br>
compiling dln.c<br>
compiling localeinit.c<br>
creating verconf.h<br>
verconf.h updated<br>
compiling loadpath.c<br>
compiling prelude.c<br>
linking static-library libruby-static.a<br>
verifying static-library libruby-static.a<br>
linking shared-library libruby.so.2.4.2<br>
generating makefile exts.mk<br>
configuring openssl<br>
configuring readline<br>
make[1]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
make[2]: Entering directory '/Depot/jjjj/ruby-2.4.2/ext/openssl'<br>
compiling openssl_missing.c<br>
compiling ossl.c<br>
compiling ossl_asn1.c<br>
compiling ossl_bio.c<br>
compiling ossl_bn.c<br>
compiling ossl_cipher.c<br>
compiling ossl_config.c<br>
compiling ossl_digest.c<br>
compiling ossl_engine.c<br>
compiling ossl_hmac.c<br>
compiling ossl_ns_spki.c<br>
compiling ossl_ocsp.c<br>
compiling ossl_pkcs12.c<br>
compiling ossl_pkcs5.c<br>
compiling ossl_pkcs7.c<br>
compiling ossl_pkey.c<br>
compiling ossl_pkey_dh.c<br>
compiling ossl_pkey_dsa.c<br>
compiling ossl_pkey_ec.c<br>
compiling ossl_pkey_rsa.c<br>
compiling ossl_rand.c<br>
compiling ossl_ssl.c<br>
compiling ossl_ssl_session.c<br>
compiling ossl_x509.c<br>
compiling ossl_x509attr.c<br>
compiling ossl_x509cert.c<br>
compiling ossl_x509crl.c<br>
compiling ossl_x509ext.c<br>
compiling ossl_x509name.c<br>
compiling ossl_x509req.c<br>
compiling ossl_x509revoked.c<br>
compiling ossl_x509store.c<br>
linking shared-object openssl.so<br>
installing default openssl libraries<br>
make[2]: Leaving directory '/Depot/jjjj/ruby-2.4.2/ext/openssl'<br>
make[2]: Entering directory '/Depot/jjjj/ruby-2.4.2/ext/readline'<br>
compiling readline.c<br>
linking shared-object readline.so<br>
make[2]: Leaving directory '/Depot/jjjj/ruby-2.4.2/ext/readline'<br>
make[2]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
linking shared-library libruby.so.2.4.2<br>
linking ruby<br>
make[2]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
make[1]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
making enc<br>
make[1]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
compiling ./enc/encdb.c<br>
linking encoding encdb.so<br>
compiling ./enc/big5.c<br>
linking encoding big5.so<br>
compiling ./enc/cp949.c<br>
linking encoding cp949.so<br>
compiling ./enc/emacs_mule.c<br>
linking encoding emacs_mule.so<br>
compiling ./enc/euc_jp.c<br>
linking encoding euc_jp.so<br>
compiling ./enc/euc_kr.c<br>
linking encoding euc_kr.so<br>
compiling ./enc/euc_tw.c<br>
linking encoding euc_tw.so<br>
compiling ./enc/gb2312.c<br>
linking encoding gb2312.so<br>
compiling ./enc/gb18030.c<br>
linking encoding gb18030.so<br>
compiling ./enc/gbk.c<br>
linking encoding gbk.so<br>
compiling ./enc/iso_8859_1.c<br>
linking encoding iso_8859_1.so<br>
compiling ./enc/iso_8859_2.c<br>
linking encoding iso_8859_2.so<br>
compiling ./enc/iso_8859_3.c<br>
linking encoding iso_8859_3.so<br>
compiling ./enc/iso_8859_4.c<br>
linking encoding iso_8859_4.so<br>
compiling ./enc/iso_8859_5.c<br>
linking encoding iso_8859_5.so<br>
compiling ./enc/iso_8859_6.c<br>
linking encoding iso_8859_6.so<br>
compiling ./enc/iso_8859_7.c<br>
linking encoding iso_8859_7.so<br>
compiling ./enc/iso_8859_8.c<br>
linking encoding iso_8859_8.so<br>
compiling ./enc/iso_8859_9.c<br>
linking encoding iso_8859_9.so<br>
compiling ./enc/iso_8859_10.c<br>
linking encoding iso_8859_10.so<br>
compiling ./enc/iso_8859_11.c<br>
linking encoding iso_8859_11.so<br>
compiling ./enc/iso_8859_13.c<br>
linking encoding iso_8859_13.so<br>
compiling ./enc/iso_8859_14.c<br>
linking encoding iso_8859_14.so<br>
compiling ./enc/iso_8859_15.c<br>
linking encoding iso_8859_15.so<br>
compiling ./enc/iso_8859_16.c<br>
linking encoding iso_8859_16.so<br>
compiling ./enc/koi8_r.c<br>
linking encoding koi8_r.so<br>
compiling ./enc/koi8_u.c<br>
linking encoding koi8_u.so<br>
compiling ./enc/shift_jis.c<br>
linking encoding shift_jis.so<br>
compiling ./enc/utf_16be.c<br>
linking encoding utf_16be.so<br>
compiling ./enc/utf_16le.c<br>
linking encoding utf_16le.so<br>
compiling ./enc/utf_32be.c<br>
linking encoding utf_32be.so<br>
compiling ./enc/utf_32le.c<br>
linking encoding utf_32le.so<br>
compiling ./enc/windows_31j.c<br>
linking encoding windows_31j.so<br>
compiling ./enc/windows_1250.c<br>
linking encoding windows_1250.so<br>
compiling ./enc/windows_1251.c<br>
linking encoding windows_1251.so<br>
compiling ./enc/windows_1252.c<br>
linking encoding windows_1252.so<br>
compiling ./enc/windows_1253.c<br>
linking encoding windows_1253.so<br>
compiling ./enc/windows_1254.c<br>
linking encoding windows_1254.so<br>
compiling ./enc/windows_1257.c<br>
linking encoding windows_1257.so<br>
make[1]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
making trans<br>
make[1]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
compiling ./enc/trans/transdb.c<br>
linking transcoder transdb.so<br>
compiling ./enc/trans/big5.c<br>
linking transcoder big5.so<br>
compiling ./enc/trans/chinese.c<br>
linking transcoder chinese.so<br>
compiling ./enc/trans/ebcdic.c<br>
linking transcoder ebcdic.so<br>
compiling ./enc/trans/emoji.c<br>
linking transcoder emoji.so<br>
compiling ./enc/trans/emoji_iso2022_kddi.c<br>
linking transcoder emoji_iso2022_kddi.so<br>
compiling ./enc/trans/emoji_sjis_docomo.c<br>
linking transcoder emoji_sjis_docomo.so<br>
compiling ./enc/trans/emoji_sjis_kddi.c<br>
linking transcoder emoji_sjis_kddi.so<br>
compiling ./enc/trans/emoji_sjis_softbank.c<br>
linking transcoder emoji_sjis_softbank.so<br>
compiling ./enc/trans/escape.c<br>
linking transcoder escape.so<br>
compiling ./enc/trans/gb18030.c<br>
linking transcoder gb18030.so<br>
compiling ./enc/trans/gbk.c<br>
linking transcoder gbk.so<br>
compiling ./enc/trans/iso2022.c<br>
linking transcoder iso2022.so<br>
compiling ./enc/trans/japanese.c<br>
linking transcoder japanese.so<br>
compiling ./enc/trans/japanese_euc.c<br>
linking transcoder japanese_euc.so<br>
compiling ./enc/trans/japanese_sjis.c<br>
linking transcoder japanese_sjis.so<br>
compiling ./enc/trans/korean.c<br>
linking transcoder korean.so<br>
compiling ./enc/trans/single_byte.c<br>
linking transcoder single_byte.so<br>
compiling ./enc/trans/utf8_mac.c<br>
linking transcoder utf8_mac.so<br>
compiling ./enc/trans/utf_16_32.c<br>
linking transcoder utf_16_32.so<br>
make[1]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
making encs<br>
make[1]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
make[1]: Nothing to be done for 'encs'.<br>
make[1]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
/Depot/jjjj/ruby-2.4.2/makei<br>
generating x86_64-linux-fake.rb<br>
In file included from /usr/include/stdio.h:27:0,<br>
from ./include/ruby/defines.h:101,<br>
from ./include/ruby/ruby.h:36,<br>
from ./version.c:12:<br>
/usr/include/features.h:331:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]</p>
<a name="warning-_FORTIFY_SOURCE-requires-compiling-with-optimization-O"></a>
<h1 >warning _FORTIFY_SOURCE requires compiling with optimization (-O)<a href="#warning-_FORTIFY_SOURCE-requires-compiling-with-optimization-O" class="wiki-anchor">¶</a></h1>
<pre><code>^~~~~~~
</code></pre>
<p>cc1: warning: unrecognized command line option '-Wno-self-assign'<br>
cc1: warning: unrecognized command line option '-Wno-constant-logical-operand'<br>
cc1: warning: unrecognized command line option '-Wno-parentheses-equality'<br>
x86_64-linux-fake.rb updated<br>
CC = gcc<br>
LD = ld<br>
LDSHARED = gcc -shared<br>
CFLAGS = -O2 -fPIC -fno-strict-overflow -Wno-error -fPIC<br>
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT<br>
CPPFLAGS = -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/9.0.0<br>
DLDFLAGS = -Wl,--compress-debug-sections=zlib -Wl,-soname,libruby.so.2.4 -fstack-protector<br>
SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm<br>
gcc (GCC) 7.2.0<br>
Copyright (C) 2017 Free Software Foundation, Inc.<br>
This is free software; see the source for copying conditions. There is NO<br>
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
<p>generating enc.mk<br>
making srcs under enc<br>
make[1]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
make[1]: Nothing to be done for 'srcs'.<br>
make[1]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
generating transdb.h<br>
transdb.h unchanged<br>
generating makefile exts.mk<br>
make[1]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
make[2]: Entering directory '/Depot/jjjj/ruby-2.4.2/ext/openssl'<br>
make[2]: Leaving directory '/Depot/jjjj/ruby-2.4.2/ext/openssl'<br>
make[2]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
make[2]: 'ruby' is up to date.<br>
make[2]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
make[1]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
making enc<br>
make[1]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
make[1]: Nothing to be done for 'enc'.<br>
make[1]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
making trans<br>
make[1]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
make[1]: Nothing to be done for './enc/trans'.<br>
make[1]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
making encs<br>
make[1]: Entering directory '/Depot/jjjj/ruby-2.4.2'<br>
make[1]: Nothing to be done for 'encs'.<br>
make[1]: Leaving directory '/Depot/jjjj/ruby-2.4.2'<br>
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"<br>
/Depot/jjjj/ruby-2.4.2/lib/rubygems/specification.rb:17:in <code>require': cannot load such file -- stringio (LoadError) from /Depot/jjjj/ruby-2.4.2/lib/rubygems/specification.rb:17:in </code><top (required)>'<br>
from /Depot/jjjj/ruby-2.4.2/lib/rubygems.rb:1334:in <code>require' from /Depot/jjjj/ruby-2.4.2/lib/rubygems.rb:1334:in </code><a href="module:Gem" class="external">module:Gem</a>'<br>
from /Depot/jjjj/ruby-2.4.2/lib/rubygems.rb:116:in <code><top (required)>' from ./tool/rbinstall.rb:24:in </code>require'<br>
from ./tool/rbinstall.rb:24:in `'<br>
make: *** [uncommon.mk:284: do-install-nodoc] Error 1</p>
<hr>
<p>What is peculiar is that I can compile ruby from source without<br>
an installed ruby. But if I have an installed ruby, it fails,<br>
during the "make install" step. "make" itself finishes without<br>
error.</p> Ruby master - Bug #14053 (Closed): Problem with case/when menus in ruby 2.5.0dev (2017-10-25) [x8...https://redmine.ruby-lang.org/issues/140532017-10-25T11:03:57Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello.</p>
<p>I think something must have changed in ruby recently in regards to how<br>
case/when menus are handled. I am using svn checkout of ruby today.</p>
<p>I can trigger strange bug events that appear to be semi-random:</p>
<hr>
<p>NODE_OP_CDECL<br>
NODE_ARGS_AUX<br>
NODE_SCOPE<br>
NODE_STR<br>
NODE_ARGS</p>
<hr>
<p>(1)</p>
<p>/Programs/Ruby/25.10.2017/lib/ruby/site_ruby/2.5.0/beautiful_url/menu.rb: /Programs/Ruby/25.10.2017/lib/ruby/site_ruby/2.5.0/beautiful_url/menu.rb:2848: NODE_CASE: unknown node (NODE_OP_CDECL) (SyntaxError</p>
<hr>
<p>(2)</p>
<p>You may have encountered a bug in the Ruby interpreter or extension libraries.<br>
Bug reports are welcome.<br>
For details: <a href="http://www.ruby-lang.org/bugreport.html" class="external">http://www.ruby-lang.org/bugreport.html</a></p>
<p>Aborted</p>
<hr>
<p>(3)</p>
<p>/Programs/Ruby/25.10.2017/lib/ruby/site_ruby/2.5.0/beautiful_url/menu.rb: /Programs/Ruby/25.10.2017/lib/ruby/site_ruby/2.5.0/beautiful_url/menu.rb:171: iseq_compile_each: unknown node (NODE_ARGS_AUX) (SyntaxError)</p>
<hr>
<p>(4)</p>
<p>/Programs/Ruby/25.10.2017/lib/ruby/site_ruby/2.5.0/beautiful_url/menu.rb: /Programs/Ruby/25.10.2017/lib/ruby/site_ruby/2.5.0/beautiful_url/menu.rb: NODE_CASE: unknown node (NODE_SCOPE) (SyntaxError)</p>
<hr>
<p>(5)</p>
<p>/Programs/Ruby/25.10.2017/lib/ruby/site_ruby/2.5.0/beautiful_url/menu.rb: /Programs/Ruby/25.10.2017/lib/ruby/site_ruby/2.5.0/beautiful_url/menu.rb:6084: NODE_CASE: unknown node (NODE_STR) (SyntaxError)</p>
<hr>
<p>(6)</p>
<p>/Programs/Ruby/25.10.2017/lib/ruby/site_ruby/2.5.0/beautiful_url/menu.rb: /Programs/Ruby/25.10.2017/lib/ruby/site_ruby/2.5.0/beautiful_url/menu.rb:2849: iseq_compile_each: unknown node (NODE_ARGS) (SyntaxError)</p>
<hr>
<p>The above errors appear to happen randomly. I should note that this is<br>
a really HUGE case/when menu. I even split it up into separate .rb files<br>
because I used to get "out of memory" errors with ruby. :D</p>
<p>With the stable "ruby 2.4.2p198" I do not get the above, semi-random<br>
errors, so I am quite sure that something may have changed since then.</p>
<p>I removed the gem "beautiful_url" for the time being, until I have<br>
finished reworking it; then I will upload it again.</p>
<p>Before the above errors, I also had some more specific errors about<br>
specific lines that appeared to be "wrong" to ruby 2.5.x - but ruby<br>
2.4.x was fine with that.</p>
<p>The most confusing part is that I can randomly "trigger" different<br>
results, upon invoking the above. Sometimes I just get a plain<br>
SEGFAULT, and sometimes I seem to randomly get NODE_OP_CDECL or<br>
NODE_ARGS_AUX or NODE_SCOPE or NODE_STR or NODE_ARGS. I have never<br>
seen that behaviour before. :)</p>
<p>I am sorry to be unable to give more information right now. I will<br>
continue to investigate but most time I spend with ruby 2.4.2 and<br>
perhaps the above error may disappear in a while. (May be due to<br>
errors in my own .rb files, but since ruby 2.4.2 does not exhibit<br>
the above issue, I think it must be because something may have<br>
changed in ruby 2.5.x).</p>
<p>I'll try to make this more reproducable if it keeps on appearing<br>
in later svn-checkouts in some days / a few weeks perhaps. I test<br>
upcoming ruby semi-regularly.</p>
<p>Thanks!</p> Ruby master - Bug #14020 (Closed): Not really a bug, more a warning - in net/ftp.rb line 331, unu...https://redmine.ruby-lang.org/issues/140202017-10-16T15:34:56Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby folks,</p>
<p>Just a tiny warning after I compiled the latest svn from source:</p>
<p>/Programs/Ruby/16.10.2017/lib/ruby/2.5.0/net/ftp.rb:331: warning: assigned but unused variable - sock</p>
<p>Not sure how to resolve this; if it is not used, perhaps it could be called _sock instead?</p> Ruby master - Misc #13968 (Open): [Ruby 3.x perhaps] - A (minimal?) static variant of rubyhttps://redmine.ruby-lang.org/issues/139682017-10-03T20:42:16Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby core team and everyone else,</p>
<p>I think this has been brought up before, in one way or the other, but<br>
just in case it was not, or not in this context, I would like to <strong>propose<br>
that ruby can be compiled statically</strong>.</p>
<p>Matz explained how this can be done for mruby:</p>
<p><a href="https://github.com/mruby/mruby/issues/3707" class="external">https://github.com/mruby/mruby/issues/3707</a></p>
<p>This is not so difficult; allow me to copy/paste the major<br>
steps for mruby (I modified it a bit):</p>
<p>Option A:</p>
<pre><code>(1) compile your.rb files into a C file via mrbc. Example: "mrbc -Binit_yourlib -o mrblib.c *.rb"
(2) your code/application has to call "init_yourlib(mrb)" after "mrb_open()"
(3) compile your code/application with the generated C file
(4) link via "libmruby.a"
(5) static link options may have to be specified to the linker
</code></pre>
<p>Option B</p>
<pre><code>(1) Create a binary "mrbgem". See mrbgems/mruby-bin-mirb for example.
</code></pre>
<p>And nobu added better support for statically linked extensions some years<br>
ago:</p>
<p><a href="https://bugs.ruby-lang.org/issues/9018" class="external">https://bugs.ruby-lang.org/issues/9018</a></p>
<p>Since time is a limited resource by the ruby core team, I understand that<br>
you have to prioritize on issues that are more important, or needed more;<br>
and a statically compiled ruby may not be of highest priority. Additionally,<br>
you may want to know the use case of people, as to why they may want to<br>
have a statically compiled variant of ruby.</p>
<p>I have a (small) use case which I think has not been explained before.</p>
<p>I often break stuff on my linux system when I compile programs. I use many<br>
ruby helper scripts to compile programs, so I need ruby. :)</p>
<p>When I have a ruby available then I can often batch-compile, batch-install<br>
and so on. This works very well so far for most programs out there.</p>
<p>Not always is there a host system available with ruby though; sometimes<br>
I may be in a confined environment, such as workspaces at university<br>
and a central server cluster to which I have no access (or rather,<br>
permission to change files/directory). So I tend to compile into the<br>
user directory there (home directory).</p>
<p>Anyway. Since I tend to break stuff, but sometimes other stuff is also<br>
broken on such environments (looking at centos ...), I made it a habit<br>
to compile some of the core utilities in a static manner into my home<br>
directory; "make" for example or "sed". Both work very well. Others<br>
are a bit misbehaving or stubborn, such as awk - I haven't managed<br>
a statically compiled variant of awk yet.</p>
<p>Of course I also use "busybox," a statically compiled busybox that is.</p>
<p>This allows me to recover from many problems or errors if things go<br>
awry (I can also use a live-DVD for recovery, at the least at home;<br>
or also download some binaries that I know will work on the target<br>
platform, so I have more ways to recover).</p>
<p>Now the thing is - most of what I do with busybox, has to do with<br>
file manipulation of some sort; setting new symlinks, removing,<br>
moving, creating files or directories.</p>
<p>Here I thought - I could use ruby rather than busybox. :)</p>
<p>But I'd want or need a statically compiled ruby, so that it does not<br>
break depending on other programs there on the system.</p>
<p>I hope I could explain my use case. And I agree, only very few<br>
people may ever want to have this perhaps.</p>
<p>I looked at my self-compiled MRI ruby, via "ldd", and these are the<br>
libraries that ruby depends on:</p>
<pre><code> linux-vdso.so.1
libpthread.so.0 => /lib64/libpthread.so.0
libgmp.so.10 => /usr/lib/libgmp.so.10
libdl.so.2 => /lib64/libdl.so.2
libcrypt.so.1 => /lib64/libcrypt.so.1
libm.so.6 => /lib64/libm.so.6
libc.so.6 => /lib64/libc.so.6
/lib64/ld-linux-x86-64.so.2
</code></pre>
<p>I guess this is not minimal; I could probably re-compile ruby<br>
from a sandbox, to reduce the amount of .so objects that are<br>
needed, but the above is only an example anyway.</p>
<p>I assume that making available a ruby that can be statically compiled,<br>
is not trivial. It is probably easier for mruby, but mruby is, as far<br>
as I understand it, more aimed towards knowledgable C/C++ hackers. I<br>
am a bit too scared to try mruby when I do not really know C.</p>
<p>I should also state that I do not need a "full" ruby by the way. I can<br>
live without the extension stuff, such as "readline" or "openssl" probably<br>
(though I'd love to have open-uri since that may help in recovery; ruby's<br>
open() functionality for remote data/websites is great).</p>
<p>I guess the core functionality I would need is, mostly, file manipulation.</p>
<p>So perhaps my request could be titled:</p>
<p>"A minimal variant of ruby - that is statically linked."</p>
<p>Now this may fit to mruby perhaps but I am a bit scared of mruby also<br>
because I do not know mruby very well; I mostly work with MRI ruby. (I<br>
did manage to compile mruby without problem and I could run ruby code<br>
too but I am not sure how much is available on mruby by default "out<br>
of the box". If I remember correctly, not every MRI ruby .rb file<br>
will work "out of the box")</p>
<p>I also thought of filing an issue request at github-mruby but then I<br>
thought that perhaps it may also fit into MRI ruby one day, which is<br>
why I prepended with the ruby 3.x label. (I suppose that it may not<br>
fit towards 2.x anymore since 2.x will probably focus on stability,<br>
bug fixing and so forth.)</p>
<p>I hope I could explain my use case. I am not sure if it is a good<br>
use case; I can probably just keep on using busybox ... but I would<br>
prefer to actually work within a "ruby environment" in general,<br>
simply because ruby is a LOT nicer to work with, in particular for<br>
batch-automated tasks (I always prefer to use ruby rather than shell<br>
scripts, for example).</p>
<p>If possible it would be nice if this issue could remain open for a<br>
bit longer, if only to see if there is anyone else who may want to<br>
have some statically compiled variant of ruby.</p>
<p>I see this sometimes in other issue requests, or similar suggestions,<br>
so perhaps if there may be a seizable amount of people who may want<br>
it, it could be put on a "long-term goal". Perhaps even past 3.x.</p>
<p>Last but not least I would like to repeat that I do not need a full<br>
featured ruby per se, a minimal may suffice - but that minimal ruby<br>
should ideally be easy to use+install. It's a bit like a mix<br>
between "MRI ruby" and "mruby" what I want, I think. :D</p>
<p>That way, I could both have a MRI ruby that uses .so, but also e. g<br>
a binary called "static-ruby" or "ruby-static" or something like<br>
that, that can be used a bit like a "recovery ruby".</p>
<p>I wrote a lot so now it's time to close without much further ado -<br>
thank you for reading!</p> Ruby master - Feature #13934 (Open): [Feature request] Being able to set a default encoding other...https://redmine.ruby-lang.org/issues/139342017-09-24T14:07:54Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby-core team and everyone else,</p>
<p>I propose a "project-wide encoding" or a "toplevel namespace wide encoding".</p>
<p>I'll soon explain what I mean there; but first, allow me to start with a<br>
problem description or more, a slight inconvenience.</p>
<p>In Ruby we can use an Encoding String in a .rb file such as<br>
"# Encoding: ISO-8859-1" or any of the other encodings, after the shebang<br>
line. This is also described here:</p>
<p><a href="https://docs.ruby-lang.org/en/2.4.0/Encoding.html" class="external">https://docs.ruby-lang.org/en/2.4.0/Encoding.html</a></p>
<p>This is fine and works but if you have lots of .rb files and also files<br>
under the bin/ subdirectory of a gem, then this is not really a great<br>
way to handle encoding IMO. It can become cumbersome, in particular if<br>
you consider switching to another encoding again one day. (I may have<br>
to switch to Unicode, at the least for some projects).</p>
<p>For Unicode, this is probably not a big deal because it is the default<br>
anyway, but for other encodings, this is a bit annoying. The more files<br>
you have, the more often you may have to use the magic encoding comment.</p>
<p>Thus, I propose some easier way to set the Encoding on a per-project, that<br>
is, per "namespace" way.</p>
<p>I think most ruby hackers will use a toplevel constant, usually a module,<br>
sometimes a class, for their projects. So this could be used to designate<br>
another default encoding to use other than Unicode - but only on a<br>
per-project basis (per-toplevel constant), rather than hardcoded in every<br>
individual .rb file.</p>
<p>So, for example, let's illustrate this, as this may make things easier<br>
to understand.</p>
<p>Given the "module Foobar", and two classes called "A" and "B" inside of<br>
this module, we can set the default encoding to be used in this way then:</p>
<pre><code>module Foobar
class A; end
class B; end
end
Foobar.default_encoding = 'ISO-8859-1'
</code></pre>
<p>The name for the method is just a suggestion; any other method name could<br>
be used. The more important part is whether the functionality would be<br>
good/useful. (In theory one could also use other ways, such as via Kernel<br>
or Object, and specifying the encoding to be used on another namespace,<br>
but I thought that setting the default encoding on the particular constant<br>
which the ruby hacker wants to modify, would make the most sense.)</p>
<p>The above would be essentially equivalent to using a line such as<br>
"# Encoding: ISO-8859-1" in all the individual .rb files (at the<br>
least in the .rb files that require this information).</p>
<p>I am not sure if I have missed anything here, perhaps it is not possible or<br>
unwanted, I have no idea. But I wanted to suggest it anyway since it may<br>
give people the ability to quickly change the default encoding for all .rb<br>
files, rather than having to specify it via post-shebang lines. Note that<br>
invoking this method would also overrule any individual shebang definitions,<br>
as the ruby hacker who invokes this method, will be assumed to know what<br>
he/she is doing. Feel free to close this issue at any moment in time.</p>
<p>Thanks for reading!</p>
<p>May ruby save many ducklings.</p> Ruby master - Feature #13922 (Open): Consider showing warning messages about same-named aliases -...https://redmine.ruby-lang.org/issues/139222017-09-19T23:53:57Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>I file here rather than at <a href="https://github.com/yuki24/did_you_mean" class="external">https://github.com/yuki24/did_you_mean</a> because I am not sure<br>
if the site by Yuki Nishijima may be appropriate, so I think first ruby core has to<br>
decide on this.</p>
<p>Consider the following code:</p>
<pre><code>#!/usr/bin/ruby -w
# =========================================================================== #
class Foo
def initialize
unused_variable_warning = 42
bar
end
def bar
puts 'hello from bar'
end; alias bar1 bar
alias bar2 bar
alias bar3 bar
alias bar3 bar
end
Foo.new
</code></pre>
<p>The output will be something like:</p>
<pre><code>foo.rb:7: warning: assigned but unused variable - unused_variable_warning
hello from bar
</code></pre>
<p>This is all fine. We get a warning, which is good.</p>
<p>My question is: should the same alias name also cause<br>
a warning?</p>
<p>It is probably unimportant because it is an alias to the very same<br>
method anyway, but I was just wondering in general.</p>
<p>In my opinion it may be better to actually also show a warning<br>
similar to unused variables. But I can not say since perhaps<br>
people may prefer to not see any warning - I think that in most<br>
cases, in the above, though, most people may have made a typo<br>
or so. This is actually how I encountered this, I wanted to add<br>
a new alias and noticed that I have had already two other, same<br>
named aliases. It is no big deal but I was only wondering whether<br>
the above behaviour to not show any warning was just an oversight<br>
or whether it is deliberate.</p> Ruby master - Misc #13909 (Rejected): [Docu] Typo in ruby ftp - "Returns true iff the connection ...https://redmine.ruby-lang.org/issues/139092017-09-17T01:49:47Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>At:</p>
<p><a href="https://ruby-doc.org/stdlib-2.4.1/libdoc/net/ftp/rdoc/Net/FTP.html#method-i-closed-3F" class="external">https://ruby-doc.org/stdlib-2.4.1/libdoc/net/ftp/rdoc/Net/FTP.html#method-i-closed-3F</a></p>
<p>"Returns true iff the connection is closed."</p>
<p>The "iff" should be "if".</p> Ruby master - Bug #13879 (Rejected): [Not sure if a bug or not] case/when menus and trailing ',' ...https://redmine.ruby-lang.org/issues/138792017-09-07T10:49:56Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello,</p>
<p>I am not sure if the following is a bug or a feature.</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">x</span> <span class="o">=</span> <span class="s1">'foobar'</span>
<span class="k">case</span> <span class="n">x</span>
<span class="k">when</span> <span class="s1">'a'</span><span class="p">,</span><span class="s1">'b'</span><span class="p">,</span><span class="s1">'c'</span><span class="p">,</span>
<span class="n">x</span> <span class="o">=</span> <span class="mi">5</span>
<span class="k">end</span>
<span class="nb">puts</span> <span class="n">x</span>
</code></pre>
<p>Works fine.</p>
<p>But this here:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">x</span> <span class="o">=</span> <span class="s1">'foobar'</span>
<span class="k">case</span> <span class="n">x</span>
<span class="k">when</span> <span class="s1">'a'</span><span class="p">,</span><span class="s1">'b'</span><span class="p">,</span><span class="s1">'c'</span><span class="p">,</span>
<span class="nb">puts</span> <span class="mi">5</span>
<span class="k">end</span>
</code></pre>
<p>Leads to this error:</p>
<pre><code>syntax error, unexpected tINTEGER, expecting keyword_do or '{' or '('
</code></pre>
<p>Is this deliberately so? My confusion is that case/when works fine<br>
in one case, but leads to an error in another case. I am not<br>
sure if it is a bug or not, but I believe in the first case,<br>
the user may have not wanted to put a trailing ',' there and<br>
simply forgot to remove it. That is actually how I found out about<br>
this behaviour, since I have a huge case/when menu and sometimes<br>
make typos when re-arranging entries, including such trailing ','<br>
via copy/paste jobs. :)</p>
<p>If it is a bug then perhaps it can be fixed; if it is not a<br>
bug, perhaps the official documentation could explain this<br>
feature? Or perhaps if trailing ',' are not useful, there<br>
may be a warning issued or something in the first case.</p>
<p>Anyway, I am just reporting this in case nobody knows about<br>
this - feel free to close this issue at any moment in time.</p>
<p>Thanks.</p> Ruby master - Feature #13860 (Open): A proposal for a new, simpler class-method addition to Time ...https://redmine.ruby-lang.org/issues/138602017-09-02T10:10:39Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby-folks,</p>
<p>On reddit someone linked in this:</p>
<p><a href="http://www.w3school.in/w3schools/php-tutorial/php-date-time" class="external">http://www.w3school.in/w3schools/php-tutorial/php-date-time</a></p>
<p>Just in the event that this may not be available lateron, or nobody<br>
wants to look at external links, I'll very briefly note that this is<br>
about PHP; and how PHP is handling time - at the least to a degree.</p>
<p>I am not interested in most of the examples from there, except for the<br>
first one, which is this:</p>
<pre><code><?php
echo date("Y-m-d");
?>
Output:2012-11-25
</code></pre>
<p>Specifically, the <strong>date("Y-m-d")</strong> notation.</p>
<p>I believe that this is quite easy to read for many people - Year,<br>
month, day. Seems simple to me.</p>
<p>In Ruby, there are or may be many other ways - the two that I tend to<br>
use the most, all come via <strong>Time.now.strftime()</strong>:</p>
<p>Time.now.strftime "%d.%m.%Y" # My favourite dd.mm.yyyy notation<br>
Time.now.strftime "%H:%M:%S" # And to complement, hh.mm.ss notation</p>
<p>To me it seemed to be the most flexible; I could also of course use<br>
both together such as "%d.%m.%Y-%H:%M:%S". The primary reason why I tend<br>
to keep them different is that I often have to return the current date,<br>
but not always the hour-minutes-seconds notation. So I need the first<br>
variant more frequently than the second variant.</p>
<p>However had, although the above does not bother me at all really, as<br>
I usually use custom helper-methods, such as return_date or something<br>
to point to these two invocations, I do have to say that the <strong>PHP date()<br>
variant</strong> may actually be simpler and shorter to read - both from the<br>
arguments that are passed to it, and also from the API call, than the<br>
ruby variant.</p>
<p>Which brings me to the <strong>issue request</strong> here:</p>
<ul>
<li>Would it be possible for ruby to also use a short or shorter variant,<br>
similar to PHP? It can be the same API, or a different name; I think<br>
that this is mostly secondary what the method name ultimately is,<br>
compared to the question over whether ruby would provide a simpler API<br>
here or not. And also the possibility to omit the '%' of course. I think<br>
that in the above examples, the '%' should not really be necessary if<br>
we already assigned a special meaning to the individual characters -<br>
at the least for a new method. It's ok to retain Time.now.strftime()<br>
hebaviour how it is.</li>
</ul>
<p>I do not mean to just copy/paste the PHP solution per se, necessarily,<br>
but more generally, these two requests for the issue report here:</p>
<p>(a) Allow for arguments to have the '%' be omitted.</p>
<p>This may be for another method, so I do NOT suggest this for strftime()<br>
to be the case, strftime() can remain as it is just fine; I just would<br>
like to also see a shorter variant that is possible to use in ruby, just<br>
like the PHP variant. This method could automatically prepend a '%' when<br>
it "sees" something such as "Y-m-d". So the latter would then be similar<br>
to "%Y-%m-%d". I hope I could explain what I mean there. :)</p>
<p>This may be fully equivalent to exactly this API call:</p>
<pre><code>Time.now.strftime "%Y-%m-%d"
</code></pre>
<p>I am currently unaware of time/date variants in Ruby that allow for this<br>
or a similar use of arguments.</p>
<p>(b) Allow for simpler invocation examples, such as perhaps Time.date() ...</p>
<p>I am not sure if date() is a good method name there, but if people have a<br>
better idea, I am all for it. Giving things a proper name is hard.</p>
<p>I would suggest a short name though, as otherwise there is no real<br>
advantage compared to Time.now.strftime(). So perhaps Time.date()<br>
would be ok nonetheless?</p>
<p>Ultimately, this would allow us to have a very short variant available as<br>
well, similar as to what PHP would allow for. So, for example, the PHP<br>
variant here:</p>
<pre><code>echo date("Y-m-d");
</code></pre>
<p>would "translate" to this variant in Ruby, then:</p>
<pre><code>puts Time.date "Y-m-d"
</code></pre>
<p>Almost the same amount of characters used. :D</p>
<p>For anyone who wants to have a look at <strong>Time</strong> and <strong>Date</strong> in Ruby before<br>
chiming in, here are the links to the documentation of these two:</p>
<pre><code>https://ruby-doc.org/core/Time.html
https://ruby-doc.org/stdlib/libdoc/date/rdoc/Date.html
</code></pre>
<p>On a side note, I also wondered whether one could use Time.now("Y-m-d")<br>
but I think that everything else aside, this might confuse people<br>
more than do good - so a new method may be better.</p>
<p>I have also noticed Date.today() ... so I thought about using it, such<br>
as via Date.today 'H:M:S' - but I think that it may be better to have<br>
it reside within Time, rather than Date. Date.today() presenty only accepts<br>
Floats rather than Strings as input, so it is probably also easier to add a<br>
separate, new and different method rather than change an existing method.</p>
<p>I only had a brief look whether existing methods could be adapted but I<br>
think - a new method may be better and easier altogether.</p>
<p>Internally, the proposal for Time.date() would then just use Time.now.strftime()<br>
and also insert '%' characters accordingly, unless these characters already exist<br>
there. So people could use both the '%' variant but also omit it and use the<br>
non '%' variant, simply for more flexibility. Eeven though the variant with<br>
fewer characters would be the main point why this issue request has been<br>
written here. But if people want to use '%' even there, that is fine - I<br>
do not intend to reduce flexibility, only to extend flexibility. :)</p>
<p>Sorry for this lengthy request here - please do feel free to close it at<br>
any time if you feel it is not a good addition/idea/fit.</p> Ruby master - Misc #13787 (Open): The path to Ruby 3.x - would it be useful to have a separate th...https://redmine.ruby-lang.org/issues/137872017-08-07T21:09:14Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello everyone but especially so the whole ruby-core team,</p>
<p>This is very long, so if you just want the short gist, please<br>
jump to the:</p>
<p>TL;DR line closer to the bottom.</p>
<p>Matz gave several presentations in the last ~3 years or so (and of course<br>
before that as well; but I am mostly focusing only on the 3 recent years,<br>
in particular because due to the path towards ruby 3.x).</p>
<p>I lately watched the presentation matz gave in Singapore and he made<br>
some references to things that will, quite likely, go into ruby 3.x,<br>
while he also said that there is a ton of work ahead - JIT compile<br>
strategies; the (optional, I guess) type system; better concurrency<br>
and so on and so forth. These are probably the big ideas - while this<br>
is nice, and I agree with comments such as "nobody minds if ruby gets<br>
faster" (everyone loves when things get done instantly rather than<br>
when you must wait), I myself am actually even more interested in<br>
smaller things. Even when they are incompatible with ruby 2.x, but<br>
I think that matz said that backwards-compatibility breaking changes<br>
may happen in ruby 3.x but not in ruby 2.x. Which is both good<br>
and bad - good because people do not have to rewrite stuff to<br>
run in ruby 2.x; bad if there are some habits or anything that<br>
isn't that great when writing software in ruby.</p>
<p>Sorry for my lengthy introduction so far - I wanted to explain the<br>
angle I am coming from here.</p>
<p>Now ...</p>
<p>I have wanted to make some smaller changes and suggestions towards<br>
ruby 3.x. And matz once said that the core team (and, well, matz,<br>
since he is the boss :D ) is open to ideas. In ruby 2.x, often the<br>
core team asks for use cases, which is fine - some proposals have<br>
not been thought through and others are purely theoretical; whereas<br>
others are also originating from some real use case. For ruby 3.x,<br>
it is obviously ... difficult to get a real use case out. :)</p>
<p>But one can actually try to make the argument about this or that<br>
in ruby 2.x not working very well, or being confusing.</p>
<p>For example, some days ago, I wanted to suggest a simplified<br>
API and usage for running external programs in ruby. We have<br>
system(), backticks, IO, popen, open3 ... and I do not know<br>
what else. All of which works slightly differently and it is,<br>
at the least to me, quite confusing sometimes. So I wanted<br>
to suggest a simplification... but I realized that this is<br>
not really a good topic for the ruby 2.x branch because I think<br>
that matz wants to retain compatibility, so such a proposal<br>
probably has not a big chance to be implemented. Perhaps for<br>
some minor changes, but I'd actually also suggest to get rid<br>
of some of the duplicate ways, while retaining flexibility<br>
still (so I'd say... system and backticks remain, and then<br>
perhaps only one or two more ways for more advanced use<br>
cases, via a simpler API than this strange ... open2 open3<br>
and what not...).</p>
<p>Anyway.</p>
<p>If you think this through then it probably does not fit much<br>
into "Features" for ruby 2.x because ruby 2.x will remain<br>
backwards compatible, I think.</p>
<p>But for ruby 3.x, it may it.</p>
<p>There are many more smaller ideas like this... for example, I'd<br>
like to see the warning/error situation be improved in ruby<br>
3.x in particular.</p>
<p>I'd also like case/when objects to become full objects and be<br>
passable/convertable ad-hoc into a hash or hash-like object,<br>
and re-used in different .rb files. (The workarounds I know<br>
about are usually to use a hash, with these aliases, but I<br>
found case/when menu to be so much more readable and nicer<br>
to use, especially as you can also use regexes).</p>
<p>And many more ideas like that!</p>
<p>But they all do not really fit into the "Bug" section, neither into<br>
the "Feature" subsection... they may fit somewhat into "Misc" but<br>
it's not a good category.</p>
<p>So, without any further explanation and further ado, here is the<br>
summary and proposal:</p>
<p>TL;DR - Would it be useful to have a separate thread here at the<br>
issue tracker, for discussions and issues and ideas related to<br>
ruby 3.x?</p>
<p>This can be kept primarily as an ideas section for the time being;<br>
at a later time, when ruby 3.x becomes the official ruby one day,<br>
the subsection can be closed and archived for, say, 3 years or so<br>
as read-only, before it would then be deleted (when ruby 3.x<br>
is eventually used more frequently than ruby 2.x, which I guess<br>
may take a few years ... there is a LOT of inertia in general,<br>
we can see this in perl, python etc..).</p>
<p>The reason why I think that this would be useful is because it<br>
could potentially foster some idea discussions. Getting early<br>
ideas in may be good, because ruby 3.x, while it is still<br>
quite far away I think (2020 or beyond?), getting ideas in early<br>
may help to see that they, or a variation, is considered for<br>
inclusion. Otherwise we then may have to wait for more years<br>
because ruby 3.x may be frozen and people would have to wait<br>
for ruby 4.x - this is the primary reason why I'd like to see<br>
a separate thread.</p>
<p>I can not say if this is useful or not to anyone else, and I<br>
can not say if this leads to more ideas or discussion for ruby<br>
3.x features (aside from the big ideas matz already mentioned<br>
several times before, such as better concurrency/guilds, JIT<br>
and speed improves in general or any optional type system -<br>
that's already quite a lot to work on, and all this in addition<br>
to mruby ... but I think ideas are not bad, even if it is not<br>
possible to implement several of them due to lack of time. When<br>
matz approves of an idea, who knows, perhaps someone else may<br>
see that the approved idea will be worked on).</p>
<p>Sorry for this lengthy note - feel free to close this at<br>
any moment in time, for any reason!</p> Ruby master - Bug #13709 (Closed): Problem compiling https://cache.ruby-lang.org/pub/ruby/snapsho...https://redmine.ruby-lang.org/issues/137092017-07-03T11:23:28Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby core team,</p>
<p>I here report some kind of bug during the ... "make install" step,<br>
I think. I'll soon get into this but first my host system:</p>
<h1>====================================================================<br>
Operating System: GNU/Linux<br>
Os Bit Type: i686<br>
CPU Model: Intel(R) Celeron(R) CPU G1630 @ 2.80GHz, cores<br>
CFLAGS in use: -O2 -fPIC -fno-strict-overflow -Wno-error<br>
RAM: 7977364 kB RAM (7790.4 MB) (7.6 Gig)<br>
Gcc Version: 7.1.0<br>
Glibc Version: 2.23<br>
Kernel Version: 4.4.14<br>
Ruby Version: 2.4.1p111 (2017-03-22 revision 58053) [i686-linux]<br>
Rubygems Version: 2.6.12<br>
Rubygem Installation Directory: /usr/lib/ruby/gems/2.4.0/</h1>
<p>(I had a second ruby installation at /usr prefix; the new ruby that I<br>
would compile, would use another --prefix, as can be seen lateron.)</p>
<p>Now, so that you can reproduce my steps, here we go:</p>
<ol>
<li>First, I was downloading the latest snapshot .tar.gz file from<br>
this URL:</li>
</ol>
<p><a href="https://cache.ruby-lang.org/pub/ruby/snapshot.tar.gz" class="external">https://cache.ruby-lang.org/pub/ruby/snapshot.tar.gz</a></p>
<p>I downloaded it and repackaged it into "ruby-03.07.2017" so that<br>
I know when I downloaded it.</p>
<p>Now I extracted it into:</p>
<p>/Depot/jjj/ruby-03.07.2017/</p>
<p>And from that directory, I would use the following configure call:</p>
<p>./configure --prefix=/Programs/Ruby/03.07.2017 --enable-debug-env --enable-load-relative --enable-frozen-string-literal-debug --enable-pthread --enable-shared --with-ext=readline,openssl,+ --disable-install-capi --disable-install-doc --disable-install-rdoc</p>
<p>(Also note that I was trying out the "--with-ext=readline,openssl,+" variant<br>
with the '+' last - I have not yet tried it so I have no idea if it works<br>
or not.)</p>
<p>Anyway, here is the configure output - this seems to be fine:</p>
<pre><code>checking for ruby... /usr/bin//ruby
downloading config.guess ... done
downloading config.sub ... done
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin//grep
checking for egrep... /usr/bin//grep -E
checking whether gcc needs -traditional... no
checking for ld... ld
checking whether the linker is GNU ld... yes
checking whether gcc -E accepts -o... yes
checking for __sync_val_compare_and_swap... yes
checking for ranlib... ranlib
checking for ar... ar
checking for ar D option... yes
checking for as... as
checking for objdump... objdump
checking for objcopy... objcopy
checking for nm... nm
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin//ginstall -c
checking for a thread-safe mkdir -p... /usr/bin//mkdir -p
checking for dtrace... no
checking for dot... no
checking for doxygen... doxygen
checking for pkg-config... pkg-config
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... yes
checking whether -Wl,-R. is accepted as LDFLAGS... yes
checking whether -Wl,-rpath,. is accepted as LDFLAGS... yes
checking whether -Wno-unused-parameter is accepted as CFLAGS... yes
checking whether -Wno-parentheses is accepted as CFLAGS... yes
checking whether -Wno-long-long is accepted as CFLAGS... yes
checking whether -diag-disable=2259 is accepted as CFLAGS... no
checking whether -Wno-missing-field-initializers is accepted as CFLAGS... yes
checking whether -Wno-tautological-compare is accepted as CFLAGS... yes
checking whether -Wno-parentheses-equality is accepted as CFLAGS... yes
checking whether -Wno-constant-logical-operand is accepted as CFLAGS... yes
checking whether -Wno-self-assign is accepted as CFLAGS... yes
checking whether -Wunused-variable is accepted as CFLAGS... yes
checking whether -Werror=implicit-int is accepted as CFLAGS... yes
checking whether -Werror=pointer-arith is accepted as CFLAGS... yes
checking whether -Werror=write-strings is accepted as CFLAGS... yes
checking whether -Werror=declaration-after-statement is accepted as CFLAGS... yes
checking whether -Werror=shorten-64-to-32 is accepted as CFLAGS... no
checking whether -Wshorten-64-to-32 is accepted as CFLAGS... no
checking whether -Werror=implicit-function-declaration is accepted as CFLAGS... yes
checking whether -Werror=division-by-zero is accepted as CFLAGS... no
checking whether -Wdivision-by-zero is accepted as CFLAGS... no
checking whether -Werror=deprecated-declarations is accepted as CFLAGS... yes
checking whether -Wno-packed-bitfield-compat is accepted as CFLAGS... yes
checking whether -Wsuggest-attribute=noreturn is accepted as CFLAGS... yes
checking whether -Wsuggest-attribute=format is accepted as CFLAGS... yes
checking whether -Wimplicit-fallthrough=0 is accepted as CFLAGS... yes
checking whether -Werror=extra-tokens is accepted as CFLAGS... no
checking whether -Wextra-tokens is accepted as CFLAGS... no
checking whether -Wall -Wextra is accepted as CFLAGS... yes
checking whether -Qunused-arguments is accepted as CFLAGS... no
checking whether INFINITY is available without C99 option... yes
checking whether NAN is available without C99 option... yes
checking whether -D_FORTIFY_SOURCE=2 is accepted as CFLAGS... yes
checking whether -fstack-protector is accepted as CFLAGS... yes
checking whether -fstack-protector is accepted as LDFLAGS... yes
checking whether -Wl,--compress-debug-sections=zlib is accepted as LDFLAGS... yes
checking whether -std=gnu99 is accepted as CFLAGS... yes
checking whether -fno-strict-overflow is accepted as CFLAGS... yes
checking whether -ggdb3 is accepted as CFLAGS... yes
checking whether -fvisibility=hidden is accepted as CFLAGS... yes
checking whether -fno-fast-math is accepted as CFLAGS... yes
checking whether -fexcess-precision=standard is accepted as CFLAGS... yes
checking whether -fp-model precise is accepted as CFLAGS... no
checking for crypt in -lcrypt... yes
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking for shutdown in -lsocket... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking a.out.h usability... yes
checking a.out.h presence... yes
checking for a.out.h... yes
checking atomic.h usability... no
checking atomic.h presence... no
checking for atomic.h... no
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking intrinsics.h usability... no
checking intrinsics.h presence... no
checking for intrinsics.h... no
checking langinfo.h usability... yes
checking langinfo.h presence... yes
checking for langinfo.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking malloc/malloc.h usability... no
checking malloc/malloc.h presence... no
checking for malloc/malloc.h... no
checking malloc_np.h usability... no
checking malloc_np.h presence... no
checking for malloc_np.h... no
checking net/socket.h usability... no
checking net/socket.h presence... no
checking for net/socket.h... no
checking process.h usability... no
checking process.h presence... no
checking for process.h... no
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking setjmpex.h usability... no
checking setjmpex.h presence... no
checking for setjmpex.h... no
checking sys/attr.h usability... no
checking sys/attr.h presence... no
checking for sys/attr.h... no
checking sys/fcntl.h usability... yes
checking sys/fcntl.h presence... yes
checking for sys/fcntl.h... yes
checking sys/file.h usability...
yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/id.h usability... no
checking sys/id.h presence... no
checking for sys/id.h... no
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/prctl.h usability... yes
checking sys/prctl.h presence... yes
checking for sys/prctl.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/sendfile.h usability... yes
checking sys/sendfile.h presence... yes
checking for sys/sendfile.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/syscall.h usability... yes
checking sys/syscall.h presence... yes
checking for sys/syscall.h... yes
checking sys/sysmacros.h usability... yes
checking sys/sysmacros.h presence... yes
checking for sys/sysmacros.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/utime.h usability... no
checking sys/utime.h presence... no
checking for sys/utime.h... no
checking syscall.h usability... yes
checking syscall.h presence... yes
checking for syscall.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking ucontext.h usability... yes
checking ucontext.h presence... yes
checking for ucontext.h... yes
checking utime.h usability... yes
checking utime.h presence... yes
checking for utime.h... yes
checking gmp.h usability... yes
checking gmp.h presence... yes
checking for gmp.h... yes
checking for library containing __gmpz_init... -lgmp
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking whether char is unsigned... no
checking for inline... inline
checking for working volatile... yes
checking for typeof syntax and keyword spelling... typeof
checking for long long... yes
checking for off_t... yes
checking char bit... 8
checking size of int... 4
checking size of short... 2
checking size of long... 4
checking size of long long... 8
checking size of __int64... 0
checking size of __int128... 0
checking size of off_t... 8
checking size of void*... 4
checking size of float... 4
checking size of double... 8
checking size of time_t... 4
checking size of clock_t... 4
checking packed struct attribute... x __attribute__((packed))
checking for printf prefix for long long... ll
checking for pid_t... yes
checking for convertible type of pid_t... INT
checking for uid_t... yes
checking for convertible type of uid_t... UINT
checking for gid_t... yes
checking for convertible type of gid_t... UINT
checking for time_t... yes
checking for convertible type of time_t... LONG
checking for dev_t... yes
checking for convertible type of dev_t... ULL
checking for mode_t... yes
checking for convertible type of mode_t... UINT
checking for rlim_t... yes
checking for convertible type of rlim_t... ULL
checking for off_t... (cached) yes
checking for convertible type of off_t... LL
checking for clockid_t... yes
checking for convertible type of clockid_t... INT
checking for prototypes... yes
checking token paste string... ansi
checking stringization... #expr
checking string literal concatenation... yes
checking for variable length prototypes and stdarg.h... yes
checking for variable length macro... yes
checking for CONSTFUNC function attribute... __attribute__ ((__const__)) x
checking for PUREFUNC function attribute... __attribute__ ((__pure__)) x
checking for NORETURN function attribute... __attribute__ ((__noreturn__)) x
checking for DEPRECATED function attribute... __attribute__ ((__deprecated__)) x
checking for DEPRECATED_BY function attribute... __attribute__ ((__deprecated__("by "#n))) x
checking for DEPRECATED_TYPE type attribute... __attribute__ ((__deprecated__ mesg)) x
checking for NOINLINE function attribute... __attribute__ ((__noinline__)) x
checking for ALWAYS_INLINE function attribute... __attribute__ ((__always_inline__)) x
checking for WARN_UNUSED_RESULT function attribute... __attribute__ ((__warn_unused_result__)) x
checking for MAYBE_UNUSED function attribute... __attribute__ ((__unused__)) x
checking for ERRORFUNC function attribute... __attribute__ ((__error__ mesg)) x
checking for WARNINGFUNC function attribute... __attribute__ ((__warning__ mesg)) x
checking for WEAK function attribute... __attribute__ ((__weak__)) x
checking for FUNC_STDCALL function attribute... __attribute__ ((__stdcall__)) x
checking for FUNC_CDECL function attribute... __attribute__ ((__cdecl__)) x
checking for FUNC_FASTCALL function attribute... __attribute__ ((__fastcall__)) x
checking for FUNC_UNOPTIMIZED function attribute... __attribute__ ((__optimize__("O0"))) x
checking for FUNC_MINIMIZED function attribute... __attribute__ ((__optimize__("-Os","-fomit-frame-pointer"))) x
checking for function alias... alias
checking for __atomic builtins... yes
checking for __sync builtins... yes
checking for __builtin_unreachable... yes
checking for exported function attribute... __attribute__ ((__visibility__("default")))
checking for function name string predefined identifier... __func__
checking if enum over int is allowed... yes
checking whether sys_nerr is declared... yes
checking whether getenv is declared... yes
checking for size_t... yes
checking size of size_t... 4
checking size of ptrdiff_t... 4
checking for printf prefix for size_t... z
checking for printf prefix for ptrdiff_t... t
checking for struct stat.st_blksize... yes
checking for struct stat.st_blocks... yes
checking for struct stat.st_rdev... yes
checking size of struct stat.st_size... SIZEOF_OFF_T
checking size of struct stat.st_blocks... SIZEOF_OFF_T
checking size of struct stat.st_ino... SIZEOF_LONG_LONG
checking for struct stat.st_atim... yes
checking for struct stat.st_atimespec... no
checking for struct stat.st_atimensec... no
checking for struct stat.st_mtim... yes
checking for struct stat.st_mtimespec... no
checking for struct stat.st_mtimensec... no
checking for struct stat.st_ctim... yes
checking for struct stat.st_ctimespec... no
checking for struct stat.st_ctimensec... no
checking for struct stat.st_birthtimespec... no
checking for struct timeval... yes
checking size of struct timeval.tv_sec... SIZEOF_TIME_T
checking for struct timespec... yes
checking for struct timezone... yes
checking for clockid_t... (cached) yes
checking for fd_mask... yes
checking for int8_t... yes
checking size of int8_t... 1
checking for uint8_t... yes
checking size of uint8_t... 1
checking for int16_t... yes
checking size of int16_t... 2
checking for uint16_t... yes
checking size of uint16_t... 2
checking for int32_t... yes
checking size of int32_t... 4
checking for uint32_t... yes
checking size of uint32_t... 4
checking for int64_t... yes
checking size of int64_t... 8
checking for uint64_t... yes
checking size of uint64_t... 8
checking for int128_t... no
checking for uint128_t... no
checking for intptr_t... yes
checking size of intptr_t... 4
checking for uintptr_t... yes
checking size of uintptr_t... 4
checking for ssize_t... yes
checking size of ssize_t... 4
checking for stack end address... __libc_stack_end
checking for uid_t in sys/types.h... (cached) yes
checking type of array argument to getgroups... gid_t
checking return type of signal handlers... void
checking for working alloca.h... yes
checking for alloca... yes
checking for dynamic size alloca... ok
checking for working memcmp... yes
checking for broken erfc of glibc-2.3.6 on IA64... no
checking for acosh... yes
checking for cbrt... yes
checking for crypt... yes
checking for dup2... yes
checking for erf... yes
checking for explicit_bzero... no
checking for ffs... yes
checking for finite... yes
checking for flock... yes
checking for hypot... yes
checking for isinf... yes
checking for isnan... yes
checking for lgamma_r... yes
checking for memmove... yes
checking for nextafter... yes
checking for setproctitle... no
checking for strchr... yes
checking for strerror... yes
checking for strlcat... no
checking for strlcpy... no
checking for strstr... yes
checking for tgamma... yes
checking sys/pstat.h usability... no
checking sys/pstat.h presence... no
checking for sys/pstat.h... no
checking for signbit... yes
checking for broken memmem... no
checking for pid_t... (cached) yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for __syscall... no
checking for _longjmp... yes
checking for arc4random_buf... no
checking for atan2l... yes
checking for atan2f... yes
checking for chroot... yes
checking for chsize... no
checking for clock_gettime... yes
checking for cosh... yes
checking for crypt_r... yes
checking for daemon... (cached) no
checking for dirfd... yes
checking for dl_iterate_phdr... yes
checking for dlopen... yes
checking for dladdr... yes
checking for dup... yes
checking for dup3... yes
checking for eaccess... yes
checking for endgrent... yes
checking for fchmod... yes
checking for fchown... yes
checking for fcntl... yes
checking for fdatasync... yes
checking for fdopendir... yes
checking for fgetattrlist... no
checking for fmod... yes
checking for fstatat... yes
checking for fsync... yes
checking for ftruncate... yes
checking for ftruncate64... yes
checking for getattrlist... no
checking for getcwd... yes
checking for getgidx... no
checking for getgrnam... yes
checking for getgrnam_r... yes
checking for getgroups... yes
checking for getpgid... yes
checking for getpgrp... yes
checking for getpriority... yes
checking for getpwnam_r... yes
checking for getresgid... yes
checking for getresuid... yes
checking for getrlimit... yes
checking for getsid... yes
checking for gettimeofday... yes
checking for getuidx... no
checking for gmtime_r... yes
checking for initgroups... yes
checking for ioctl... yes
checking for isfinite... no
checking for issetugid... no
checking for killpg... yes
checking for lchmod... no
checking for lchown... yes
checking for link... yes
checking for llabs... yes
checking for lockf... yes
checking for log2... yes
checking for lstat... yes
checking for malloc_usable_size... yes
checking for malloc_size... no
checking for mblen... yes
checking for memalign... yes
checking for memset_s... no
checking for writev... yes
checking for memrchr... yes
checking for memmem... yes
checking for mkfifo... yes
checking for mknod... yes
checking for mktime... yes
checking for openat... yes
checking for pipe2... yes
checking for poll... yes
checking for posix_fadvise... yes
checking for posix_memalign... yes
checking for ppoll... yes
checking for pread... yes
checking for pwrite... yes
checking for qsort_r... yes
checking for qsort_s... no
checking for readlink... yes
checking for round... yes
checking for sched_getaffinity... yes
checking for seekdir... yes
checking for select_large_fdset... no
checking for sendfile... yes
checking for setegid... yes
checking for setenv... yes
checking for seteuid... yes
checking for setgid... yes
checking for setgroups... yes
checking for setpgid... yes
checking for setpgrp... yes
checking for setregid... yes
checking for setresgid... yes
checking for setresuid... yes
checking for setreuid... yes
checking for setrgid... no
checking for setrlimit... yes
checking for setruid... no
checking for setsid... yes
checking for setuid... yes
checking for shutdown... yes
checking for sigaction... yes
checking for sigaltstack... yes
checking for sigprocmask... yes
checking for sinh... yes
checking for spawnv... no
checking for symlink... yes
checking for syscall... yes
checking for sysconf... yes
checking for tanh... yes
checking for telldir... yes
checking for timegm... yes
checking for times... yes
checking for truncate... yes
checking for truncate64... yes
checking for unsetenv... yes
checking for utimensat... yes
checking for utimes... yes
checking for wait4... yes
checking for waitpid... yes
checking if getcwd allocates buffer if NULL is given... yes
checking crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking for struct crypt_data.initialized... yes
checking for __builtin_bswap16... yes
checking for __builtin_bswap32... yes
checking for __builtin_bswap64... yes
checking for __builtin_popcount... yes
checking for __builtin_popcountll... yes
checking for __builtin_clz... yes
checking for __builtin_clzl... yes
checking for __builtin_clzll... yes
checking for __builtin_ctz... yes
checking for __builtin_ctzll... yes
checking for __builtin_add_overflow... yes
checking for __builtin_sub_overflow... yes
checking for __builtin_mul_overflow... yes
checking for __builtin_mul_overflow_p... yes
checking for __builtin_constant_p... yes
checking for __builtin_choose_expr... yes
checking for __builtin_choose_expr_constant_p... yes
checking for __builtin_types_compatible_p... yes
checking whether qsort_r is GNU version... yes
checking whether qsort_r is BSD version... no
checking whether atan2 handles Inf as C99... yes
checking for clock_getres... yes
checking for unsetenv returns a value... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for struct tm.tm_gmtoff... yes
checking for external int daylight... yes
checking for external timezone... long
checking for external altzone... no
checking for timezone... yes
checking whether timezone requires zero arguments... yes
checking for negative time_t for gmtime(3)... yes
checking for localtime(3) overflow correctly... yes
checking for sig_t... yes
checking whether right shift preserve sign bit... yes
checking whether _SC_CLK_TCK is supported... yes
checking stack growing direction on i686... -1
checking for pthread_kill in -lthr... no
checking for pthread_kill in -lpthread... yes
checking for pthread_np.h... no
checking whether pthread_t is scalar type... yes
checking for sched_yield... yes
checking for pthread_attr_setinheritsched... yes
checking for pthread_attr_get_np... no
checking for pthread_attr_getstack... yes
checking for pthread_get_stackaddr_np... no
checking for pthread_get_stacksize_np... no
checking for thr_stksegment... no
checking for pthread_stackseg_np... no
checking for pthread_getthrds_np... no
checking for pthread_cond_init... yes
checking for pthread_condattr_setclock... yes
checking for pthread_condattr_init... yes
checking for pthread_sigmask... yes
checking for pthread_setname_np... yes
checking for pthread_set_name_np... no
checking for pthread_getattr_np... yes
checking for pthread_attr_init... yes
checking arguments of pthread_setname_np... (pthread_self(), name)
checking if mcontext_t is a pointer... no
checking for getcontext... yes
checking for setcontext... yes
checking if fork works with pthread... yes
checking whether ELF binaries are produced... yes
checking elf.h usability... yes
checking elf.h presence... yes
checking for elf.h... yes
checking elf_abi.h usability... no
checking elf_abi.h presence... no
checking for elf_abi.h... no
checking whether OS depend dynamic link works... yes
checking for backtrace... yes
checking for broken backtrace... no
checking valgrind/memcheck.h usability... no
checking valgrind/memcheck.h presence... no
checking for valgrind/memcheck.h... no
checking for strip... strip
checking whether -Wl,--no-undefined is accepted as LDFLAGS... yes
checking whether wrapper for LD_LIBRARY_PATH is needed... no
checking whether dtrace USDT is available... no
checking for __builtin_setjmp... yes with cast ()
checking for _setjmpex as a macro or function... no
checking for _setjmp as a macro or function... yes
checking for sigsetjmp as a macro or function... no
checking for setjmp type... __builtin_setjmp
checking for prefix of external symbols... NONE
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking if make is GNU make... yes
checking for nroff... /usr/bin/nroff
.ext/include/i686-linux/ruby/config.h updated
configure: ruby library version = 2.5.0
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating Makefile
config.status: creating ruby-2.5.pc
---
Configuration summary for ruby version 2.5.0
* Installation prefix: /Programs/Ruby/03.07.2017
* exec prefix: ${prefix}
* arch: i686-linux
* site arch: ${arch}
* RUBY_BASE_NAME: ruby
* enable shared: yes
* ruby lib prefix: ${libdir}/${RUBY_BASE_NAME}
* site libraries path: ${rubylibprefix}/${sitearch}
* vendor path: ${rubylibprefix}/vendor_ruby
* target OS: linux
* compiler: gcc
* with pthread: yes
* enable shared libs: yes
* dynamic library ext: so
* CFLAGS: ${optflags} ${debugflags} ${warnflags}
* LDFLAGS: -L. -fstack-protector -rdynamic \
-Wl,-export-dynamic
* optflags: -O3 -fno-fast-math
* debugflags: -ggdb3 -DRUBY_DEVEL=1
* warnflags: -Wall -Wextra -Wno-unused-parameter \
-Wno-parentheses -Wno-long-long \
-Wno-missing-field-initializers \
-Wno-tautological-compare \
-Wno-parentheses-equality \
-Wno-constant-logical-operand -Wno-self-assign \
-Wunused-variable -Werror=implicit-int \
-Werror=pointer-arith -Werror=write-strings \
-Werror=declaration-after-statement \
-Werror=implicit-function-declaration \
-Werror=deprecated-declarations \
-Wno-packed-bitfield-compat \
-Wsuggest-attribute=noreturn \
-Wsuggest-attribute=format \
-Wimplicit-fallthrough=0
* strip command: strip -S -x
* install doc: no
* man page type: doc
</code></pre>
<hr>
<p>The above summary appears to be ok-ish.</p>
<p>Next, I would do "make" and "make install", where<br>
"makeia" is my alias for both:</p>
<p>/Depot/jjj/ruby-03.07.2017/makeia</p>
<p>Starting with make, then make install</p>
<p>(Here now comes the results from "make"; gcc variant in use<br>
is 7.1.0)</p>
<pre><code> CC = gcc
LD = ld
LDSHARED = gcc -shared
CFLAGS = -O2 -fPIC -fno-strict-overflow -Wno-error -fPIC
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT
CPPFLAGS = -I. -I.ext/include/i686-linux -I./include -I. -I./enc/unicode/9.0.0
DLDFLAGS = -Wl,--compress-debug-sections=zlib -Wl,-soname,libruby.so.2.5 -fstack-protector
SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm
LANG = en_GB
LC_ALL = en_US.ISO-8859-1
LC_CTYPE =
gcc (GCC) 7.1.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
compiling ./main.c
compiling dmydln.c
compiling miniinit.c
compiling dmyext.c
compiling miniprelude.c
making dummy probes.h
compiling array.c
compiling bignum.c
compiling class.c
compiling compar.c
compiling compile.c
In function 'iseq_build_kw.isra.67',
inlined from 'rb_iseq_build_from_ary' at compile.c:7150:30:
compile.c:7047:9: warning: argument 1 range [2147483648, 4294967295] exceeds maximum object size 2147483647 [-Walloc-size-larger-than=]
dvs = ALLOC_N(VALUE, (unsigned int)default_len);
In file included from ./include/ruby/ruby.h:36:0,
from ./include/ruby.h:33,
from internal.h:15,
from compile.c:12:
compile.c: In function 'rb_iseq_build_from_ary':
./include/ruby/defines.h:184:18: note: in a call to allocation function 'ruby_xmalloc2' declared here
#define xmalloc2 ruby_xmalloc2
^
./include/ruby/defines.h:197:7: note: in expansion of macro 'xmalloc2'
void *xmalloc2(size_t,size_t) RUBY_ATTR_ALLOC_SIZE((1,2));
^~~~~~~~
compiling complex.c
compiling cont.c
compiling debug.c
compiling debug_counter.c
compiling dir.c
compiling dln_find.c
compiling encoding.c
compiling enum.c
compiling enumerator.c
compiling error.c
compiling eval.c
compiling file.c
compiling gc.c
compiling hash.c
compiling inits.c
compiling io.c
compiling iseq.c
compiling load.c
compiling marshal.c
compiling math.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
compiling proc.c
compiling process.c
compiling random.c
compiling range.c
compiling rational.c
compiling re.c
compiling regcomp.c
compiling regenc.c
compiling regerror.c
compiling regexec.c
compiling regparse.c
compiling regsyntax.c
compiling ruby.c
compiling safe.c
compiling signal.c
compiling sprintf.c
compiling st.c
compiling strftime.c
In file included from ./include/ruby/ruby.h:24:0,
from strftime.c:50:
timev.h:4:32: note: offset of packed bit-field 'mday' has changed in GCC 4.4
PACKED_STRUCT_UNALIGNED(struct vtm {
^
.ext/include/i686-linux/ruby/config.h:75:26: note: in definition of macro 'PACKED_STRUCT'
#define PACKED_STRUCT(x) x __attribute__((packed))
^
timev.h:4:1: note: in expansion of macro 'PACKED_STRUCT_UNALIGNED'
PACKED_STRUCT_UNALIGNED(struct vtm {
^~~~~~~~~~~~~~~~~~~~~~~
timev.h:4:32: note: offset of packed bit-field 'min' has changed in GCC 4.4
PACKED_STRUCT_UNALIGNED(struct vtm {
^
.ext/include/i686-linux/ruby/config.h:75:26: note: in definition of macro 'PACKED_STRUCT'
#define PACKED_STRUCT(x) x __attribute__((packed))
^
timev.h:4:1: note: in expansion of macro 'PACKED_STRUCT_UNALIGNED'
PACKED_STRUCT_UNALIGNED(struct vtm {
^~~~~~~~~~~~~~~~~~~~~~~
timev.h:4:32: note: offset of packed bit-field 'sec' has changed in GCC 4.4
PACKED_STRUCT_UNALIGNED(struct vtm {
^
.ext/include/i686-linux/ruby/config.h:75:26: note: in definition of macro 'PACKED_STRUCT'
#define PACKED_STRUCT(x) x __attribute__((packed))
^
timev.h:4:1: note: in expansion of macro 'PACKED_STRUCT_UNALIGNED'
PACKED_STRUCT_UNALIGNED(struct vtm {
^~~~~~~~~~~~~~~~~~~~~~~
compiling string.c
compiling struct.c
compiling symbol.c
compiling thread.c
In file included from ./include/ruby/ruby.h:24:0,
from eval_intern.h:4,
from thread.c:66:
timev.h:4:32: note: offset of packed bit-field 'mday' has changed in GCC 4.4
PACKED_STRUCT_UNALIGNED(struct vtm {
^
.ext/include/i686-linux/ruby/config.h:75:26: note: in definition of macro 'PACKED_STRUCT'
#define PACKED_STRUCT(x) x __attribute__((packed))
^
timev.h:4:1: note: in expansion of macro 'PACKED_STRUCT_UNALIGNED'
PACKED_STRUCT_UNALIGNED(struct vtm {
^~~~~~~~~~~~~~~~~~~~~~~
timev.h:4:32: note: offset of packed bit-field 'min' has changed in GCC 4.4
PACKED_STRUCT_UNALIGNED(struct vtm {
^
.ext/include/i686-linux/ruby/config.h:75:26: note: in definition of macro 'PACKED_STRUCT'
#define PACKED_STRUCT(x) x __attribute__((packed))
^
timev.h:4:1: note: in expansion of macro 'PACKED_STRUCT_UNALIGNED'
PACKED_STRUCT_UNALIGNED(struct vtm {
^~~~~~~~~~~~~~~~~~~~~~~
timev.h:4:32: note: offset of packed bit-field 'sec' has changed in GCC 4.4
PACKED_STRUCT_UNALIGNED(struct vtm {
^
.ext/include/i686-linux/ruby/config.h:75:26: note: in definition of macro 'PACKED_STRUCT'
#define PACKED_STRUCT(x) x __attribute__((packed))
^
timev.h:4:1: note: in expansion of macro 'PACKED_STRUCT_UNALIGNED'
PACKED_STRUCT_UNALIGNED(struct vtm {
^~~~~~~~~~~~~~~~~~~~~~~
compiling time.c
In file included from ./include/ruby/ruby.h:24:0,
from ./include/ruby.h:33,
from internal.h:15,
from time.c:14:
timev.h:4:32: note: offset of packed bit-field 'mday' has changed in GCC 4.4
PACKED_STRUCT_UNALIGNED(struct vtm {
^
.ext/include/i686-linux/ruby/config.h:75:26: note: in definition of macro 'PACKED_STRUCT'
#define PACKED_STRUCT(x) x __attribute__((packed))
^
timev.h:4:1: note: in expansion of macro 'PACKED_STRUCT_UNALIGNED'
PACKED_STRUCT_UNALIGNED(struct vtm {
^~~~~~~~~~~~~~~~~~~~~~~
timev.h:4:32: note: offset of packed bit-field 'min' has changed in GCC 4.4
PACKED_STRUCT_UNALIGNED(struct vtm {
^
.ext/include/i686-linux/ruby/config.h:75:26: note: in definition of macro 'PACKED_STRUCT'
#define PACKED_STRUCT(x) x __attribute__((packed))
^
timev.h:4:1: note: in expansion of macro 'PACKED_STRUCT_UNALIGNED'
PACKED_STRUCT_UNALIGNED(struct vtm {
^~~~~~~~~~~~~~~~~~~~~~~
timev.h:4:32: note: offset of packed bit-field 'sec' has changed in GCC 4.4
PACKED_STRUCT_UNALIGNED(struct vtm {
^
.ext/include/i686-linux/ruby/config.h:75:26: note: in definition of macro 'PACKED_STRUCT'
#define PACKED_STRUCT(x) x __attribute__((packed))
^
timev.h:4:1: note: in expansion of macro 'PACKED_STRUCT_UNALIGNED'
PACKED_STRUCT_UNALIGNED(struct vtm {
^~~~~~~~~~~~~~~~~~~~~~~
compiling transcode.c
compiling util.c
compiling variable.c
compiling version.c
compiling vm.c
compiling vm_backtrace.c
compiling vm_dump.c
compiling vm_trace.c
compiling enc/ascii.c
compiling enc/us_ascii.c
compiling enc/unicode.c
compiling enc/utf_8.c
compiling enc/trans/newline.c
compiling ./missing/explicit_bzero.c
compiling ./missing/setproctitle.c
compiling ./missing/strlcat.c
compiling ./missing/strlcpy.c
compiling addr2line.c
compiling dmyenc.c
linking miniruby
generating encdb.h
encdb.h updated
./tool/ifchange "--timestamp=.rbconfig.time" rbconfig.rb rbconfig.tmp
rbconfig.rb updated
generating enc.mk
making srcs under enc
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Nothing to be done for 'srcs'.
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
generating transdb.h
transdb.h updated
compiling dln.c
compiling localeinit.c
creating verconf.h
verconf.h updated
compiling loadpath.c
compiling prelude.c
linking static-library libruby-static.a
linking shared-library libruby.so.2.5.0
generating makefiles ext/configure-ext.mk
ext/configure-ext.mk updated
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
configuring coverage
configuring digest
configuring digest/bubblebabble
configuring digest/md5
configuring digest/rmd160
configuring digest/sha1
configuring digest/sha2
configuring continuation
configuring ripper
configuring strscan
configuring sdbm
configuring date
configuring cgi/escape
configuring bigdecimal
configuring nkf
configuring objspace
configuring rbconfig/sizeof
configuring zlib
configuring fcntl
configuring pathname
configuring racc/cparse
configuring fiber
configuring socket
configuring rubyvm
configuring stringio
configuring fiddle
configuring dbm
header: db.h
library: db
configuring openssl
configuring json
configuring json/generator
configuring json/parser
configuring pty
configuring -test-/array/resize
configuring -test-/bignum
configuring -test-/bug-3571
configuring -test-/bug-5832
configuring -test-/bug_reporter
configuring -test-/class
configuring -test-/debug
configuring -test-/dln/empty
configuring -test-/exception
configuring -test-/fatal
configuring -test-/file
configuring -test-/float
configuring -test-/funcall
configuring -test-/gvl/call_without_gvl
configuring -test-/hash
configuring -test-/integer
configuring -test-/iseq_load
configuring -test-/iter
configuring -test-/load/dot.dot
configuring -test-/marshal/compat
configuring -test-/marshal/internal_ivar
configuring -test-/marshal/usr
configuring -test-/memory_status
configuring -test-/method
configuring -test-/notimplement
configuring -test-/num2int
configuring -test-/path_to_class
configuring -test-/popen_deadlock
configuring -test-/postponed_job
configuring -test-/printf
configuring -test-/proc
configuring -test-/rational
configuring -test-/recursion
configuring -test-/regexp
configuring -test-/st/foreach
configuring -test-/st/numhash
configuring -test-/st/update
configuring -test-/string
configuring -test-/struct
configuring -test-/symbol
configuring -test-/thread_fd_close
configuring -test-/time
configuring -test-/tracepoint
configuring -test-/typeddata
configuring -test-/vm
configuring -test-/wait_for_single_fd
configuring etc
configuring io/console
configuring io/nonblock
configuring io/wait
configuring readline
configuring syslog
configuring gdbm
configuring psych
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
generating makefile exts.mk
exts.mk updated
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/coverage'
compiling coverage.c
linking shared-object coverage.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/coverage'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/digest'
compiling digest.c
linking shared-object digest.so
installing digest libraries
installing default digest libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/digest'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/digest/bubblebabble'
compiling bubblebabble.c
linking shared-object digest/bubblebabble.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/digest/bubblebabble'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/digest/md5'
compiling md5init.c
linking shared-object digest/md5.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/digest/md5'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/digest/rmd160'
compiling rmd160init.c
linking shared-object digest/rmd160.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/digest/rmd160'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/digest/sha1'
compiling sha1init.c
linking shared-object digest/sha1.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/digest/sha1'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/digest/sha2'
compiling sha2init.c
linking shared-object digest/sha2.so
installing default sha2 libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/digest/sha2'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/continuation'
compiling continuation.c
linking shared-object continuation.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/continuation'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/ripper'
compiling ripper.c
linking shared-object ripper.so
installing default ripper libraries
checking ../.././parse.y and ../.././ext/ripper/eventids2.c
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/ripper'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/strscan'
compiling strscan.c
linking shared-object strscan.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/strscan'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/sdbm'
compiling _sdbm.c
compiling init.c
linking shared-object sdbm.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/sdbm'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/date'
compiling date_core.c
compiling date_parse.c
compiling date_strftime.c
compiling date_strptime.c
linking shared-object date_core.so
installing default date_core libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/date'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/cgi/escape'
compiling escape.c
linking shared-object cgi/escape.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/cgi/escape'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/bigdecimal'
compiling bigdecimal.c
linking shared-object bigdecimal.so
installing default bigdecimal libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/bigdecimal'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/nkf'
compiling nkf.c
linking shared-object nkf.so
installing default nkf libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/nkf'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/objspace'
compiling object_tracing.c
compiling objspace.c
compiling objspace_dump.c
linking shared-object objspace.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/objspace'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/rbconfig/sizeof'
compiling sizes.c
compiling limits.c
linking shared-object rbconfig/sizeof.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/rbconfig/sizeof'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/zlib'
compiling zlib.c
linking shared-object zlib.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/zlib'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/fcntl'
compiling fcntl.c
linking shared-object fcntl.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/fcntl'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/pathname'
compiling pathname.c
linking shared-object pathname.so
installing default pathname libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/pathname'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/racc/cparse'
compiling cparse.c
linking shared-object racc/cparse.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/racc/cparse'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/fiber'
compiling fiber.c
linking shared-object fiber.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/fiber'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/socket'
compiling init.c
compiling constants.c
compiling basicsocket.c
compiling socket.c
compiling ipsocket.c
compiling tcpsocket.c
compiling tcpserver.c
compiling sockssocket.c
compiling udpsocket.c
compiling unixsocket.c
compiling unixserver.c
compiling option.c
compiling ancdata.c
compiling raddrinfo.c
compiling ifaddr.c
linking shared-object socket.so
installing default socket libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/socket'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/rubyvm'
installing default libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/rubyvm'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/stringio'
compiling stringio.c
linking shared-object stringio.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/stringio'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/fiddle'
compiling closure.c
compiling conversions.c
compiling fiddle.c
compiling function.c
compiling handle.c
compiling pointer.c
linking shared-object fiddle.so
installing default fiddle libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/fiddle'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/dbm'
compiling dbm.c
linking shared-object dbm.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/dbm'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/openssl'
compiling openssl_missing.c
compiling ossl.c
compiling ossl_asn1.c
compiling ossl_bio.c
compiling ossl_bn.c
compiling ossl_cipher.c
compiling ossl_config.c
compiling ossl_digest.c
compiling ossl_engine.c
compiling ossl_hmac.c
compiling ossl_ns_spki.c
compiling ossl_ocsp.c
compiling ossl_pkcs12.c
compiling ossl_pkcs5.c
compiling ossl_pkcs7.c
compiling ossl_pkey.c
ossl_pkey.c: In function 'ossl_generate_cb_2':
ossl_pkey.c:30:42: warning: implicit declaration of function 'BN_GENCB_get_arg'; did you mean 'BN_GENCB_set_old'? [-Wimplicit-function-declaration]
arg = (struct ossl_generate_cb_arg *)BN_GENCB_get_arg(cb);
^~~~~~~~~~~~~~~~
BN_GENCB_set_old
compiling ossl_pkey_dh.c
ossl_pkey_dh.c: In function 'dh_generate':
ossl_pkey_dh.c:103:20: warning: implicit declaration of function 'BN_GENCB_new'; did you mean 'BN_GENCB_set'? [-Wimplicit-function-declaration]
BN_GENCB *cb = BN_GENCB_new();
^~~~~~~~~~~~
BN_GENCB_set
ossl_pkey_dh.c:103:20: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
ossl_pkey_dh.c:107:2: warning: implicit declaration of function 'BN_GENCB_free'; did you mean 'BN_GENCB_set'? [-Wimplicit-function-declaration]
BN_GENCB_free(cb);
^~~~~~~~~~~~~
BN_GENCB_set
compiling ossl_pkey_dsa.c
ossl_pkey_dsa.c: In function 'dsa_generate':
ossl_pkey_dsa.c:119:20: warning: implicit declaration of function 'BN_GENCB_new'; did you mean 'BN_GENCB_set'? [-Wimplicit-function-declaration]
BN_GENCB *cb = BN_GENCB_new();
^~~~~~~~~~~~
BN_GENCB_set
ossl_pkey_dsa.c:119:20: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
ossl_pkey_dsa.c:125:2: warning: implicit declaration of function 'BN_GENCB_free'; did you mean 'BN_GENCB_set'? [-Wimplicit-function-declaration]
BN_GENCB_free(cb);
^~~~~~~~~~~~~
BN_GENCB_set
compiling ossl_pkey_ec.c
compiling ossl_pkey_rsa.c
ossl_pkey_rsa.c: In function 'rsa_generate':
ossl_pkey_rsa.c:121:20: warning: implicit declaration of function 'BN_GENCB_new'; did you mean 'BN_GENCB_set'? [-Wimplicit-function-declaration]
BN_GENCB *cb = BN_GENCB_new();
^~~~~~~~~~~~
BN_GENCB_set
ossl_pkey_rsa.c:121:20: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
ossl_pkey_rsa.c:126:2: warning: implicit declaration of function 'BN_GENCB_free'; did you mean 'BN_GENCB_set'? [-Wimplicit-function-declaration]
BN_GENCB_free(cb);
^~~~~~~~~~~~~
BN_GENCB_set
compiling ossl_rand.c
compiling ossl_ssl.c
compiling ossl_ssl_session.c
compiling ossl_x509.c
compiling ossl_x509attr.c
compiling ossl_x509cert.c
compiling ossl_x509crl.c
compiling ossl_x509ext.c
compiling ossl_x509name.c
compiling ossl_x509req.c
compiling ossl_x509revoked.c
compiling ossl_x509store.c
linking shared-object openssl.so
installing default openssl libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/openssl'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/json'
installing default libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/json'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/json/generator'
compiling generator.c
linking shared-object json/ext/generator.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/json/generator'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/json/parser'
compiling parser.c
linking shared-object json/ext/parser.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/json/parser'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/pty'
compiling pty.c
linking shared-object pty.so
installing default pty libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/pty'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/array/resize'
compiling resize.c
linking shared-object -test-/array/resize.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/array/resize'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/bignum'
compiling big2str.c
compiling div.c
compiling intpack.c
compiling bigzero.c
compiling init.c
compiling str2big.c
compiling mul.c
linking shared-object -test-/bignum.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/bignum'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/bug-3571'
compiling bug.c
linking shared-object -test-/bug_3571.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/bug-3571'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/bug-5832'
compiling bug.c
linking shared-object -test-/bug_5832.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/bug-5832'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/bug_reporter'
compiling bug_reporter.c
linking shared-object -test-/bug_reporter.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/bug_reporter'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/class'
compiling class2name.c
compiling init.c
linking shared-object -test-/class.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/class'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/debug'
compiling inspector.c
compiling init.c
compiling profile_frames.c
linking shared-object -test-/debug.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/debug'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/dln/empty'
compiling empty.c
linking shared-object -test-/dln/empty.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/dln/empty'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/exception'
compiling dataerror.c
compiling enc_raise.c
compiling ensured.c
compiling init.c
linking shared-object -test-/exception.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/exception'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/fatal'
compiling rb_fatal.c
linking shared-object -test-/fatal/rb_fatal.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/fatal'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/file'
compiling stat.c
compiling fs.c
compiling init.c
linking shared-object -test-/file.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/file'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/float'
compiling nextafter.c
compiling init.c
linking shared-object -test-/float.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/float'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/funcall'
compiling passing_block.c
linking shared-object -test-/funcall.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/funcall'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/gvl/call_without_gvl'
compiling call_without_gvl.c
linking shared-object -test-/gvl/call_without_gvl.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/gvl/call_without_gvl'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/hash'
compiling delete.c
compiling init.c
linking shared-object -test-/hash.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/hash'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/integer'
compiling core_ext.c
compiling my_integer.c
compiling init.c
linking shared-object -test-/integer.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/integer'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/iseq_load'
compiling iseq_load.c
linking shared-object -test-/iseq_load.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/iseq_load'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/iter'
compiling yield.c
compiling break.c
compiling init.c
linking shared-object -test-/iter.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/iter'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/load/dot.dot'
compiling dot.dot.c
linking shared-object -test-/load/dot.dot.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/load/dot.dot'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/marshal/compat'
compiling usrcompat.c
linking shared-object -test-/marshal/compat.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/marshal/compat'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/marshal/internal_ivar'
compiling internal_ivar.c
linking shared-object -test-/marshal/internal_ivar.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/marshal/internal_ivar'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/marshal/usr'
compiling usrmarshal.c
linking shared-object -test-/marshal/usr.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/marshal/usr'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/method'
compiling arity.c
compiling init.c
linking shared-object -test-/method.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/method'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/notimplement'
compiling bug.c
linking shared-object -test-/notimplement.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/notimplement'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/num2int'
compiling num2int.c
linking shared-object -test-/num2int.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/num2int'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/path_to_class'
compiling path_to_class.c
linking shared-object -test-/path_to_class.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/path_to_class'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/popen_deadlock'
compiling infinite_loop_dlsym.c
linking shared-object -test-/popen_deadlock/infinite_loop_dlsym.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/popen_deadlock'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/postponed_job'
compiling postponed_job.c
linking shared-object -test-/postponed_job.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/postponed_job'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/printf'
compiling printf.c
linking shared-object -test-/printf.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/printf'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/proc'
compiling super.c
compiling init.c
compiling receiver.c
linking shared-object -test-/proc.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/proc'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/rational'
compiling rat.c
linking shared-object -test-/rational.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/rational'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/recursion'
compiling recursion.c
linking shared-object -test-/recursion.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/recursion'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/regexp'
compiling parse_depth_limit.c
compiling init.c
linking shared-object -test-/regexp.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/regexp'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/st/foreach'
compiling foreach.c
linking shared-object -test-/st/foreach.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/st/foreach'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/st/numhash'
compiling numhash.c
linking shared-object -test-/st/numhash.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/st/numhash'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/st/update'
compiling update.c
linking shared-object -test-/st/update.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/st/update'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/string'
compiling coderange.c
compiling cstr.c
compiling enc_str_buf_cat.c
compiling fstring.c
compiling ellipsize.c
compiling set_len.c
compiling nofree.c
compiling enc_associate.c
compiling qsort.c
compiling normalize.c
compiling modify.c
compiling init.c
compiling capacity.c
linking shared-object -test-/string.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/string'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/struct'
compiling duplicate.c
compiling member.c
compiling len.c
compiling init.c
linking shared-object -test-/struct.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/struct'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/symbol'
compiling type.c
compiling init.c
linking shared-object -test-/symbol.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/symbol'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/thread_fd_close'
compiling thread_fd_close.c
linking shared-object -test-/thread_fd_close.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/thread_fd_close'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/time'
compiling new.c
compiling init.c
linking shared-object -test-/time.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/time'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/tracepoint'
compiling gc_hook.c
compiling tracepoint.c
linking shared-object -test-/tracepoint.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/tracepoint'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/typeddata'
compiling typeddata.c
linking shared-object -test-/typeddata.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/typeddata'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/vm'
compiling at_exit.c
linking shared-object -test-/vm/at_exit.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/vm'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/wait_for_single_fd'
compiling wait_for_single_fd.c
linking shared-object -test-/wait_for_single_fd.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/-test-/wait_for_single_fd'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/etc'
generating constant definitions
compiling etc.c
linking shared-object etc.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/etc'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/io/console'
compiling console.c
linking shared-object io/console.so
installing default console libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/io/console'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/io/nonblock'
compiling nonblock.c
linking shared-object io/nonblock.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/io/nonblock'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/io/wait'
compiling wait.c
linking shared-object io/wait.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/io/wait'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/readline'
compiling readline.c
linking shared-object readline.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/readline'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/syslog'
compiling syslog.c
linking shared-object syslog.so
installing default syslog libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/syslog'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/gdbm'
compiling gdbm.c
linking shared-object gdbm.so
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/gdbm'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/psych'
compiling psych.c
compiling psych_emitter.c
compiling psych_parser.c
compiling psych_to_ruby.c
compiling psych_yaml_tree.c
linking shared-object psych.so
installing default psych libraries
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/psych'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017'
linking shared-library libruby.so.2.5.0
linking ruby
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Nothing to be done for 'note'.
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
making enc
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
compiling ./enc/encdb.c
linking encoding encdb.so
compiling ./enc/big5.c
linking encoding big5.so
compiling ./enc/cp949.c
linking encoding cp949.so
compiling ./enc/emacs_mule.c
linking encoding emacs_mule.so
compiling ./enc/euc_jp.c
linking encoding euc_jp.so
compiling ./enc/euc_kr.c
linking encoding euc_kr.so
compiling ./enc/euc_tw.c
linking encoding euc_tw.so
compiling ./enc/gb2312.c
linking encoding gb2312.so
compiling ./enc/gb18030.c
linking encoding gb18030.so
compiling ./enc/gbk.c
linking encoding gbk.so
compiling ./enc/iso_8859_1.c
linking encoding iso_8859_1.so
compiling ./enc/iso_8859_2.c
linking encoding iso_8859_2.so
compiling ./enc/iso_8859_3.c
linking encoding iso_8859_3.so
compiling ./enc/iso_8859_4.c
linking encoding iso_8859_4.so
compiling ./enc/iso_8859_5.c
linking encoding iso_8859_5.so
compiling ./enc/iso_8859_6.c
linking encoding iso_8859_6.so
compiling ./enc/iso_8859_7.c
linking encoding iso_8859_7.so
compiling ./enc/iso_8859_8.c
linking encoding iso_8859_8.so
compiling ./enc/iso_8859_9.c
linking encoding iso_8859_9.so
compiling ./enc/iso_8859_10.c
linking encoding iso_8859_10.so
compiling ./enc/iso_8859_11.c
linking encoding iso_8859_11.so
compiling ./enc/iso_8859_13.c
linking encoding iso_8859_13.so
compiling ./enc/iso_8859_14.c
linking encoding iso_8859_14.so
compiling ./enc/iso_8859_15.c
linking encoding iso_8859_15.so
compiling ./enc/iso_8859_16.c
linking encoding iso_8859_16.so
compiling ./enc/koi8_r.c
linking encoding koi8_r.so
compiling ./enc/koi8_u.c
linking encoding koi8_u.so
compiling ./enc/shift_jis.c
linking encoding shift_jis.so
compiling ./enc/utf_16be.c
linking encoding utf_16be.so
compiling ./enc/utf_16le.c
linking encoding utf_16le.so
compiling ./enc/utf_32be.c
linking encoding utf_32be.so
compiling ./enc/utf_32le.c
linking encoding utf_32le.so
compiling ./enc/windows_31j.c
linking encoding windows_31j.so
compiling ./enc/windows_1250.c
linking encoding windows_1250.so
compiling ./enc/windows_1251.c
linking encoding windows_1251.so
compiling ./enc/windows_1252.c
linking encoding windows_1252.so
compiling ./enc/windows_1253.c
linking encoding windows_1253.so
compiling ./enc/windows_1254.c
linking encoding windows_1254.so
compiling ./enc/windows_1257.c
linking encoding windows_1257.so
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
making trans
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
compiling ./enc/trans/transdb.c
linking transcoder transdb.so
compiling ./enc/trans/big5.c
linking transcoder big5.so
compiling ./enc/trans/chinese.c
linking transcoder chinese.so
compiling ./enc/trans/ebcdic.c
linking transcoder ebcdic.so
compiling ./enc/trans/emoji.c
linking transcoder emoji.so
compiling ./enc/trans/emoji_iso2022_kddi.c
linking transcoder emoji_iso2022_kddi.so
compiling ./enc/trans/emoji_sjis_docomo.c
linking transcoder emoji_sjis_docomo.so
compiling ./enc/trans/emoji_sjis_kddi.c
linking transcoder emoji_sjis_kddi.so
compiling ./enc/trans/emoji_sjis_softbank.c
linking transcoder emoji_sjis_softbank.so
compiling ./enc/trans/escape.c
linking transcoder escape.so
compiling ./enc/trans/gb18030.c
linking transcoder gb18030.so
compiling ./enc/trans/gbk.c
linking transcoder gbk.so
compiling ./enc/trans/iso2022.c
linking transcoder iso2022.so
compiling ./enc/trans/japanese.c
linking transcoder japanese.so
compiling ./enc/trans/japanese_euc.c
linking transcoder japanese_euc.so
compiling ./enc/trans/japanese_sjis.c
linking transcoder japanese_sjis.so
compiling ./enc/trans/korean.c
linking transcoder korean.so
compiling ./enc/trans/single_byte.c
linking transcoder single_byte.so
compiling ./enc/trans/utf8_mac.c
linking transcoder utf8_mac.so
compiling ./enc/trans/utf_16_32.c
linking transcoder utf_16_32.so
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
making encs
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Nothing to be done for 'encs'.
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
generating i686-linux-fake.rb
In file included from /usr/include/stdio.h:27:0,
from ./include/ruby/defines.h:101,
from ./include/ruby/ruby.h:36,
from ./version.c:12:
/usr/include/features.h:331:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^~~~~~~
cc1: warning: unrecognized command line option '-Wno-self-assign'
cc1: warning: unrecognized command line option '-Wno-constant-logical-operand'
cc1: warning: unrecognized command line option '-Wno-parentheses-equality'
i686-linux-fake.rb updated
CC = gcc
LD = ld
LDSHARED = gcc -shared
CFLAGS = -O2 -fPIC -fno-strict-overflow -Wno-error -fPIC
XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT
CPPFLAGS = -I. -I.ext/include/i686-linux -I./include -I. -I./enc/unicode/9.0.0
DLDFLAGS = -Wl,--compress-debug-sections=zlib -Wl,-soname,libruby.so.2.5 -fstack-protector
SOLIBS = -lpthread -lgmp -ldl -lcrypt -lm
LANG = en_GB
LC_ALL = en_US.ISO-8859-1
LC_CTYPE =
gcc (GCC) 7.1.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
generating enc.mk
making srcs under enc
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Nothing to be done for 'srcs'.
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
generating transdb.h
transdb.h unchanged
generating makefiles ext/configure-ext.mk
ext/configure-ext.mk unchanged
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/digest'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/digest'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/digest/sha2'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/digest/sha2'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/ripper'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/ripper'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/date'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/date'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/bigdecimal'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/bigdecimal'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/nkf'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/nkf'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/pathname'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/pathname'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/socket'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/socket'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/rubyvm'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/rubyvm'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/fiddle'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/fiddle'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/openssl'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/openssl'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/json'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/json'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/pty'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/pty'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/io/console'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/io/console'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/syslog'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/syslog'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017/ext/psych'
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017/ext/psych'
make[2]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[2]: 'ruby' is up to date.
make[2]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Nothing to be done for 'note'.
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
making enc
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Nothing to be done for 'enc'.
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
making trans
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Nothing to be done for './enc/trans'.
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
making encs
make[1]: Entering directory '/Depot/jjj/ruby-03.07.2017'
make[1]: Nothing to be done for 'encs'.
make[1]: Leaving directory '/Depot/jjj/ruby-03.07.2017'
</code></pre>
<p>Ok so far so good - now the "make install" step appears to<br>
have a problem:</p>
<pre><code>./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -r./i686-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"
installing binary commands: /Programs/Ruby/03.07.2017/bin
installing base libraries: /Programs/Ruby/03.07.2017/lib
installing arch files: /Programs/Ruby/03.07.2017/lib/ruby/2.5.0/i686-linux
installing pkgconfig data: /Programs/Ruby/03.07.2017/lib/pkgconfig
installing command scripts: /Programs/Ruby/03.07.2017/bin
installing library scripts: /Programs/Ruby/03.07.2017/lib/ruby/2.5.0
installing common headers: /Programs/Ruby/03.07.2017/include/ruby-2.5.0
installing manpages: /Programs/Ruby/03.07.2017/share/man/man1
installing extension objects: /Programs/Ruby/03.07.2017/lib/ruby/2.5.0/i686-linux
installing extension objects: /Programs/Ruby/03.07.2017/lib/ruby/site_ruby/2.5.0/i686-linux
installing extension objects: /Programs/Ruby/03.07.2017/lib/ruby/vendor_ruby/2.5.0/i686-linux
installing extension headers: /Programs/Ruby/03.07.2017/include/ruby-2.5.0/i686-linux
installing extension scripts: /Programs/Ruby/03.07.2017/lib/ruby/2.5.0
installing extension scripts: /Programs/Ruby/03.07.2017/lib/ruby/site_ruby/2.5.0
installing extension scripts: /Programs/Ruby/03.07.2017/lib/ruby/vendor_ruby/2.5.0
installing extension headers: /Programs/Ruby/03.07.2017/include/ruby-2.5.0/ruby
installing default gems: /Programs/Ruby/03.07.2017/lib/ruby/gems/2.5.0 (build_info, cache, doc, extensions, gems, specifications)
cmath 0.0.1
csv 0.0.1
fileutils 0.7.2
rdoc 5.1.0
scanf 0.0.1
webrick 1.4.0.beta1
installing default gems: /Programs/Ruby/03.07.2017/lib/ruby/gems/2.5.0 (build_info, cache, doc, extensions, gems, specifications)
bigdecimal 1.3.2
date 0.0.1
dbm 0.5.1
etc 0.2.1
fcntl 0.0.1
fiddle 1.0.0.beta1
gdbm 2.0.0.beta1
io-console 0.4.6
json 2.1.0
openssl 2.0.4
psych 3.0.0.beta2
sdbm 0.0.1
stringio 0.0.1
strscan 0.0.1
zlib 0.0.1
installing bundle gems: /Programs/Ruby/03.07.2017/lib/ruby/gems/2.5.0 (build_info, cache, doc, extensions, gems, specifications)
did_you_mean 1.1.2
test-unit 3.2.4
minitest 5.10.2
rake 12.0.0
net-telnet 0.1.1
power_assert 1.0.2
xmlrpc 0.3.0
Traceback (most recent call last):
12: from ./tool/rbinstall.rb:844:in `<main>'
11: from ./tool/rbinstall.rb:844:in `each'
10: from ./tool/rbinstall.rb:847:in `block in <main>'
9: from ./tool/rbinstall.rb:799:in `block in <main>'
8: from ./tool/rbinstall.rb:166:in `install'
7: from /Depot/jjj/ruby-03.07.2017/lib/fileutils.rb:778:in `install'
6: from /Depot/jjj/ruby-03.07.2017/lib/fileutils.rb:1459:in `fu_each_src_dest'
5: from /Depot/jjj/ruby-03.07.2017/lib/fileutils.rb:1468:in `fu_each_src_dest0'
4: from /Depot/jjj/ruby-03.07.2017/lib/fileutils.rb:1468:in `each'
3: from /Depot/jjj/ruby-03.07.2017/lib/fileutils.rb:1470:in `block in fu_each_src_dest0'
2: from /Depot/jjj/ruby-03.07.2017/lib/fileutils.rb:1461:in `block in fu_each_src_dest'
1: from /Depot/jjj/ruby-03.07.2017/lib/fileutils.rb:779:in `block in install'
/Depot/jjj/ruby-03.07.2017/lib/fileutils.rb:779:in `stat': No such file or directory @ rb_file_s_stat - /Depot/jjj/ruby-03.07.2017/gems/rake-12.0.0.gem (Errno::ENOENT)
make: *** [uncommon.mk:310: do-install-nodoc] Error 1
</code></pre>
<p>As you can see, "rake-12.0.0.gem" was not found.</p>
<p>I looked into the directory /Depot/jjj/ruby-03.07.2017/gems/ and I am<br>
seeing some symlinks to non-existing gems which is a bit odd.</p>
<p>I will copy/paste the detailed "ls" output next:</p>
<pre><code>-rw-r--r-- 1 ftp ftp 112 Jun 9 05:20 bundled_gems
drwxr-xr-x 7 ftp ftp 4.0K Jul 3 13:05 did_you_mean-1.1.2/
lrwxrwxrwx 1 ftp ftp 43 Jun 30 20:00 did_you_mean-1.1.2.gem -> ../.downloaded-cache/did_you_mean-1.1.2.gem
drwxr-xr-x 4 ftp ftp 4.0K Jul 3 13:05 minitest-5.10.2/
lrwxrwxrwx 1 ftp ftp 40 Jun 30 20:00 minitest-5.10.2.gem -> ../.downloaded-cache/minitest-5.10.2.gem
drwxr-xr-x 4 ftp ftp 4.0K Jul 3 13:05 net-telnet-0.1.1/
lrwxrwxrwx 1 ftp ftp 41 Jun 30 20:00 net-telnet-0.1.1.gem -> ../.downloaded-cache/net-telnet-0.1.1.gem
drwxr-xr-x 4 ftp ftp 4.0K Jul 3 13:05 power_assert-1.0.2/
lrwxrwxrwx 1 ftp ftp 43 Jun 30 20:00 power_assert-1.0.2.gem -> ../.downloaded-cache/power_assert-1.0.2.gem
drwxr-xr-x 6 ftp ftp 4.0K Jul 3 13:05 rake-12.0.0/
lrwxrwxrwx 1 ftp ftp 36 Jun 30 20:00 rake-12.0.0.gem -> ../.downloaded-cache/rake-12.0.0.gem
drwxr-xr-x 6 ftp ftp 4.0K Jul 3 13:05 test-unit-3.2.4/
lrwxrwxrwx 1 ftp ftp 40 Jun 30 20:00 test-unit-3.2.4.gem -> ../.downloaded-cache/test-unit-3.2.4.gem
drwxr-xr-x 4 ftp ftp 4.0K Jul 3 13:05 xmlrpc-0.3.0/
lrwxrwxrwx 1 ftp ftp 37 Jun 30 20:00 xmlrpc-0.3.0.gem -> ../.downloaded-cache/xmlrpc-0.3.0.gem
</code></pre>
<p>All .gem files are symlinks there and they all point to non-existing .gem files.</p>
<p>This is all a bit strange anyway because all the files there appear to<br>
have been extracted already, so I am not entirely sure why there are .gem<br>
files pointing to non-existing .gem files.</p>
<p>For example, the rake-12.0.0.gem symlink points to a non-existing file,<br>
but in the current directory, there already is a directory called<br>
rake-12.0.0/</p>
<p>I had a look at that directory and it appears to contain the exact<br>
same content that the (extracted) rake-12.0.0.gem content would<br>
also have.</p>
<p>Anyway, I am not sure if I did anything wrong but I assume that<br>
there is some script or code that actually creates these strange<br>
symlinks such as "../.downloaded-cache/rake-12.0.0.gem". And I<br>
think that this code may have some problem, because otherwise I<br>
could not quite explain why it would create symlinks to non-existing<br>
files.</p>
<p>I can't give any recommended way to fix the above because I do<br>
not know which code creates the above - but my suggestion would<br>
be to add an additional check to really make sure that the .gem<br>
files actually exist at the symlinks - and checking the directory<br>
at:</p>
<p>/Depot/jjj/ruby-03.07.2017/.downloaded-cache/</p>
<p>I can say that there are only two files there:</p>
<p>config.guess<br>
config.sub</p>
<p>Anyway, just reporting this so that the ruby-core team is aware<br>
of the problem. Thanks!</p> Ruby master - Misc #13659 (Third Party's Issue): Keeping track of officially supported versions b...https://redmine.ruby-lang.org/issues/136592017-06-14T13:37:30Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby core-team and others,</p>
<p>Would it be possible to keep track of the versions that are officially supported<br>
by ruby bindings, for a particular binding?</p>
<p>For example, let's compare openssl-1.0.2k and openssl-1.1.0f. Perhaps a new openssl<br>
version will emerge in a year or so, just for sake of demonstration purpose, let's<br>
call it openssl-1.2.0.</p>
<p>Right now there is no easy way that I am aware about, for a ruby user to know whether<br>
his ruby version supports all these openssl versions or not.</p>
<p>My suggestion would be to add this information somewhere. Perhaps in the .gemspec<br>
file itself (Hiroshi Shibata added many .gemspec files for the official ruby<br>
distribution, e. g. openssl here at <a href="https://github.com/ruby/openssl/blob/master/openssl.gemspec" class="external">https://github.com/ruby/openssl/blob/master/openssl.gemspec</a><br>
and others).</p>
<p>Once this information is stored, it could also be programmatically obtained<br>
and displayed on the official ruby docu. (By the way on a side note,<br>
the ruby docu for openssl at:</p>
<p><a href="http://ruby-doc.org/stdlib-2.4.1/libdoc/openssl/rdoc/OpenSSL.html" class="external">http://ruby-doc.org/stdlib-2.4.1/libdoc/openssl/rdoc/OpenSSL.html</a></p>
<p>The rdoc parser seems to not filter away the "frozen_string_literal: false" parts, which<br>
oddly enough appear on the current page and should perhaps not appear there, but this is<br>
a side issue, a minor glitch. I just report it here in the event that someone wants<br>
to fix this minor annoyance.)</p>
<p>If this information would be stored, then it could be also displayed on<br>
the OpenSSL.html page for ruby, aka which versions are officially supported<br>
with a given ruby version.</p>
<p>I suggest this specifically for openssl because I actually had difficulties<br>
with openssl-1.1.0f so I downgraded to 1.0.2k and ruby is happy again. But<br>
I do not know if my ruby supports 1.1.0f, or whether I have made a mistake.</p>
<p>If this information would be stored somewhere, then I could instantly look<br>
at it and say "aha, this openssl version is supported" or I could say "aha,<br>
this openssl version is NOT supported". I hope you can understand what I mean<br>
here. :)</p>
<p>I suggest this for openssl but it could actually be used for ALL the bindings<br>
in ruby, that we can keep track of which versions are officially supported.</p>
<p>Perhaps it could be written into the .gemspec file itself, or perhaps into<br>
another file. I do not know. Either way I think that it is better to somewhere<br>
keep track of this information, which then allows people to quickly see<br>
whether a particular version is already supported by the particular ruby<br>
bindings or not, e. g. also zlib, readline etc... and any other bindings<br>
that are officially bundled into a ruby tarball/archive release.</p>
<p>I hope I could explain my suggestion. I filed it under Misc because it<br>
is most definitely not a bug, and also not directly a feature within<br>
ruby itself, more like documentation or so.</p>
<p>Thank you for reading!</p> Ruby master - Feature #13532 (Closed): Enable :encoding key or open-uri (open()) similar as to ho...https://redmine.ruby-lang.org/issues/135322017-05-01T18:10:18Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby core team and everyone else.</p>
<p>I lately had some odd behaviour and mixing of Encodings in my<br>
scripts.</p>
<p>I had a better look and realized that open-uri would return<br>
UTF-8 whereas my other scripts would use another encoding. So<br>
far so good, no big deal, I can just change the encoding. But<br>
I was not aware of this.</p>
<p>I then looked at the documentation and found it to be lacking:</p>
<p><a href="https://ruby-doc.org/stdlib-2.4.1/libdoc/open-uri/rdoc/OpenURI.html" class="external">https://ruby-doc.org/stdlib-2.4.1/libdoc/open-uri/rdoc/OpenURI.html</a></p>
<p>Compare this to File.readlines():</p>
<p><a href="https://ruby-doc.org/core-2.4.1/IO.html#method-c-readlines" class="external">https://ruby-doc.org/core-2.4.1/IO.html#method-c-readlines</a></p>
<p>File.readlines() also tells you how many arguments can be<br>
passed.</p>
<p>(1) So my first suggestion is - could some kind soul please also<br>
enable this for open-uri?</p>
<p>The major reason for me filing this feature request, is about<br>
encoding support though, via open-uri.</p>
<p>File.open() and File.readlines() both allow an :encoding key<br>
to be passed. This is very nifty, I use it a lot and it works<br>
very well.</p>
<p>open-uri or rather its open() functionality, allows you to<br>
pass in a Hash but this Hash has no :encoding key.</p>
<p>Example:</p>
<p>open("<a href="http://www.ruby-lang.org/" class="external">http://www.ruby-lang.org/</a>", encoding: 'ISO-8859-1')</p>
<p>Error:</p>
<p>ArgumentError: unrecognized option: encoding</p>
<p>Could this perhaps be added for symmetry and consistency,<br>
so that open() from open-uri will behave like File.read()<br>
and File.readlines() would? E. g. an example for the latter<br>
would be.</p>
<pre><code>File.readlines('foobar.rb', :encoding => 'ISO-8859-1')
</code></pre>
<p>The very same syntax could also be used for open() of<br>
open-uri.</p>
<p>Thanks for reading!</p> Ruby master - Feature #13302 (Closed): Provide a (force) --enable-openssl switch for ruby ./confi...https://redmine.ruby-lang.org/issues/133022017-03-11T17:31:09Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>I am currently setting up a lot of programs on a fresh installation.</p>
<p>Ruby compiles fine but I am having some problem getting openssl to<br>
work properly. Since it is not trivial for me to find out where<br>
the problem is exactly, I would like to suggest a commandline<br>
switch option such as --enable-openssl that will only compile<br>
ruby if it can also use the openssl bindings.</p>
<p>The ruby that is compiled without openssl is for me not very<br>
useful, largely because I can not use gem publish without<br>
openssl.</p>
<p>If such an option would exist, it is my hope that I could use<br>
it, and then ruby would also tell me why it can not use<br>
openssl.</p>
<p>For the record, I was using the LFS way to install openssl:</p>
<p><a href="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html" class="external">http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html</a></p>
<p>Openssl also compiled fine. I suspect that ruby may get<br>
confused by some files by the host pclinuxos system but<br>
until I have found out where the problem is, I think it<br>
would be nice i ruby would have a corresponding switch<br>
to only compile if openssl can also be used, as otherwise<br>
this ruby variant is not very useful to me and I will waste<br>
time compiling something that I know won't be too useful.</p>
<p>Sometimes going into ext/ can help here but ext/openssl<br>
is also not useful for me right now.</p> Ruby master - Feature #12858 (Open): Supporting batch-requiring of files in rubyhttps://redmine.ruby-lang.org/issues/128582016-10-21T07:12:18Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello. This is a very short proposal, unlike some of my previous<br>
ones; and it also is hopefully possibly better than some of my<br>
other proposals before.</p>
<p>Could we have a way to batch-require .rb files from a directory?</p>
<p>Right now we can do:</p>
<pre><code>require 'foo/bar.rb'
require 'foo/boo.rb'
require 'foo/bii.rb'
</code></pre>
<p>But this is a bit cumbersome, especially if you have lots of<br>
files to manually specify here.</p>
<p>We can do first grab these via Dir[] which works fine and<br>
then invoke require() on each entry. This also works fine<br>
and I am doing this in some of my gems, but it is a<br>
cumbersome nonetheless.</p>
<p>I was thinking of either of the following two changes perhaps:</p>
<pre><code>require_directory 'foo' # This would be similar to:
require_directory 'foo/'
</code></pre>
<p>This new method would then attempt a Dir[] before batch-requiring<br>
the specified files via require().</p>
<p>Alternatively, or additionally, perhaps require() itself<br>
could support '*'? Then we could have this for require<br>
itself like:</p>
<pre><code>require 'foo/*.rb'
</code></pre>
<p>I am not sure if this has been suggested before; there<br>
are a few gems that try to solve this but I was wondering<br>
if it could be added to ruby as a core functionality<br>
itself. Note that while my examples above center primarily<br>
around .rb files, it could of course work for .so files<br>
too, just following require() policy anyway - my main<br>
point was about batch-requiring files more easily in<br>
ruby.</p>
<p>Thanks for reading!</p>
<p>PS: It could work for load() too but I personally seem to<br>
use require() like +98% of the time so I don't care that<br>
much about load() really.</p> Ruby master - Feature #12848 (Rejected): Crazy idea: Allow regex definition for methods (Do not t...https://redmine.ruby-lang.org/issues/128482016-10-17T17:54:34Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Me again, sorry - only crazy ideas coming about as of late here.</p>
<a name="Crazy-idea-Allow-regex-definition-for-methods"></a>
<h3 >Crazy idea: Allow regex definition for methods<a href="#Crazy-idea-Allow-regex-definition-for-methods" class="wiki-anchor">¶</a></h3>
<p>I should wait until first april. :)</p>
<p>But anyway.</p>
<p>Consider this:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">def</span> <span class="nf">foo_bar</span>
<span class="nb">puts</span> <span class="s1">'hi there!'</span>
<span class="k">end</span><span class="p">;</span> <span class="k">alias</span> <span class="n">foobar</span> <span class="n">foo_bar</span>
</code></pre>
<p>Ok now we can call this either as:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">foo_bar</span><span class="p">()</span>
<span class="n">foobar</span><span class="p">()</span>
<span class="n">foo_bar</span>
<span class="n">foobar</span>
</code></pre>
<p>All things work!</p>
<p>Here I was wondering ... what if I can omit the alias part?</p>
<p>Tada! Enter regex-defined methods as idea!</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">def</span> <span class="nf">foo_?</span><span class="n">bar</span>
<span class="nb">puts</span> <span class="s1">'hi there!'</span>
<span class="k">end</span>
</code></pre>
<p>Now the above works too, without any alias. Yay!</p>
<p>I assume that this may not be possible perhaps syntax-wise - and<br>
perhaps if it WOULD be possible, it should not be done anyway.</p>
<a name="It-actually-makes-things-harder-to-read-so-I-am-also-against-this-idea-too"></a>
<h1 >It actually makes things harder to read, so I am also against this idea, too.<a href="#It-actually-makes-things-harder-to-read-so-I-am-also-against-this-idea-too" class="wiki-anchor">¶</a></h1>
<p>But!</p>
<p>It had to be published. :)</p>
<p>I think I remember once a collection of evil code in a file called<br>
evil.rb. If I remember correctly, it may have been championed by<br>
flori ... something. I even forgot the name. But it was pretty<br>
fun. I don't remember if we could have shapechanging object but<br>
I like the idea in itself (if we had that? I think you could<br>
someone change the parent class ... somehow. Actually, this may<br>
not be totally useless, I still think it may be a nice idea to<br>
have things like a generic Button.new interface that gets<br>
translated properly into the different GUI toolsets and also<br>
for www code ... unify all the things!)</p>
<p>Things like that with evil.rb are sorta fun - experiment with evil<br>
ideas that you should not use. There could be a whole type system<br>
added in it as well! Mandatory type system - things that make you<br>
unhappy when you use them. Since it is MANDATORY haha! :D</p>
<p>And then, on top of that, a ruby-to-crystal compiler just for the fun<br>
of it (well, you write in ruby... and then just let it compile into<br>
some binary via crystal ... without having to write crystal on your<br>
own ... then you'd have the best of both worlds. Crystal feels heavier<br>
on my brain than ruby but if it gives me faster binaries OR if I<br>
can distribute code as a drop-out-exe for friends to use, this<br>
would be good! My friends tend to be noobs so making things as<br>
simple as possible is good. Also, I am much more a crystal noob<br>
than a ruby noob though I am also a ruby noob too. So the crystal<br>
idea, well, actually - would be nice if ruby itself would have<br>
that too. Like scripting languages that can be compiled! And<br>
run like on something like JVM just not needing java haha.)</p>
<p>It's Caturday sorta, don't mind me.</p>
<p>So actually, I think my second idea would be to have something<br>
like evil.rb again, in stdlib/core or so. We have some <code>GOTO</code><br>
stuff too somewhere (I don't remember where ... it is probably<br>
too evil to google for it... but I did ... the variable<br>
<code>SUPPORT_JOKE</code>. We could also <code>SUPPORT_EVIL</code> yes! Or perhaps<br>
<code>SUPPORT_FUN</code> or something like that.)</p>
<p>I don't remember if evil.rb was really used a lot by anyone<br>
else, but perhaps it would be fun to toy with crazy evil<br>
features - and you can not rely on them being made available<br>
either, they may disappear or re-appear!</p>
<p>Anyway, don't take any of this too seriously please.</p> Ruby master - Feature #12843 (Open): Proposal to add a new method to class File in order to deter...https://redmine.ruby-lang.org/issues/128432016-10-16T10:39:10Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>We currently have <code>File.basename()</code> and <code>File.dirname()</code>, both of which<br>
work very well and are quite useful when working with files and<br>
directories.</p>
<p>When you want to get the filename without extension, you can use<br>
something like this:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">File</span><span class="p">.</span><span class="nf">basename</span><span class="p">(</span><span class="s1">'foo/bar/test.rb'</span><span class="p">,</span> <span class="s1">'.rb'</span><span class="p">)</span>
<span class="no">File</span><span class="p">.</span><span class="nf">basename</span><span class="p">(</span><span class="s1">'foo/bar/test.rb'</span><span class="p">,</span> <span class="s1">'.*'</span><span class="p">)</span>
</code></pre>
<p>While this works very well, I was wondering if it would be possible<br>
to add a method that does precisely that for you but which requires<br>
only one argument - the path. That would allow us to omit the ','<br>
and the second argument, which I think would be nice to have.</p>
<p>Resulting ruby code may be a tiny bit shorter:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">File</span><span class="p">.</span><span class="nf">basename</span><span class="p">(</span><span class="s1">'foo/bar/test.rb'</span><span class="p">,</span> <span class="s1">'.*'</span><span class="p">)</span>
<span class="no">File</span><span class="p">.</span><span class="nf">methodXY</span><span class="p">(</span><span class="s1">'foo/bar/test.rb'</span><span class="p">)</span>
</code></pre>
<p>Where <code>.methodXY()</code> should be the name of the new method added.</p>
<p>I would thus like to suggest a way for a new method addition, on the<br>
class <code>File</code> namespace, just like <code>.basename()</code> and <code>.dirname()</code>, that will<br>
return the filename of a given path/file, but without any suffix and<br>
without any path - so, similar to <code>File.basename()</code> but to additionally<br>
already chop away all extname suffixes.</p>
<p>Giving things a proper, meaningful name is often difficult. In<br>
particular when method names should ideally be short; both<br>
<code>.dirname</code> and <code>.basename</code> are quite short too.</p>
<p>My obvious choice would be:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">File</span><span class="p">.</span><span class="nf">filename</span><span class="p">()</span>
</code></pre>
<p>But I am not sure if this is a good name. A problem is that I<br>
can not come up with a better name.</p>
<p>We also already have <code>File.extname()</code> in order to determine the<br>
"extension name" of the file.</p>
<pre><code>https://ruby-doc.org/core-2.2.0/File.html#method-c-extname
</code></pre>
<p>So we essentially have 3 behaviours - obtain the name of the<br>
directory via <code>.dirname</code>; obtain the name of the file/entry itself,<br>
via <code>.basename</code>; and being able to obtain the name of the extension<br>
via <code>.extname</code>.</p>
<p>What we actually appear to be missing is to obtain the part<br>
of the name of a path/file/directory WITHOUT the extension<br>
and WITHOUT the leading dirname part.</p>
<p>If <code>File.filename()</code> is not a good name then perhaps any of the<br>
following may serve as better alternatives; some are obviously<br>
not really great names though, I add them mostly for comparison:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">File</span><span class="p">.</span><span class="nf">no_suffix</span><span class="p">()</span>
<span class="no">File</span><span class="p">.</span><span class="nf">corename</span><span class="p">()</span>
<span class="no">File</span><span class="p">.</span><span class="nf">corefile</span><span class="p">()</span>
<span class="no">File</span><span class="p">.</span><span class="nf">shortname</span><span class="p">()</span>
<span class="no">File</span><span class="p">.</span><span class="nf">short_name</span><span class="p">()</span>
<span class="no">File</span><span class="p">.</span><span class="nf">sname</span><span class="p">()</span>
<span class="no">File</span><span class="p">.</span><span class="nf">filename_without_extension</span><span class="p">()</span> <span class="c1"># Probably too verbose but</span>
<span class="c1"># probably more descriptive than the other names</span>
</code></pre>
<p>Anyway, I guess the name of the method is one thing - if the<br>
functionality itself would be approved, then I am sure a good<br>
name can be found for the functionality anyway if none of<br>
the above are very good choices. I just thought that it should<br>
fit towards <code>.dirname</code> <code>.basename</code> and <code>.extname</code>, hence why I put<br>
<code>.filename</code> first.</p>
<p>Thanks for reading!</p> Ruby master - Feature #12817 (Open): Consider adding method .sample() on class Hash (if this was ...https://redmine.ruby-lang.org/issues/128172016-10-06T21:14:24Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby core team and all who may read this.</p>
<p>Some time ago, I think in ruby 1.8.x, the method .sample() was added<br>
to class Array. I think before this addition, it was a bit more cumbersome<br>
to get a random entry from an array - I remember having used .shuffle.first<br>
or something like that, until I noticed that .sample() existed. (I do not<br>
remember if the first 1.8.x release that I used had it; I started with<br>
ruby in perhaps late 2003 or 2004 or so).</p>
<p>Anyway. This method is very nice for class Array if we want one or more<br>
random entries.</p>
<p>So today I wondered why class Hash does not have a sample method.</p>
<p>Are the use cases so different to class Array? The method .sample()<br>
on class Array will return a random element, right? Well, hashes<br>
also have elements, key-value settings.</p>
<p>So my proposal is to add either or all of these methods to class<br>
Hash:</p>
<pre><code>hash.sample
</code></pre>
<p>In order to illustrate what this should do, here is pseudo-code:</p>
<pre><code>hash = { cat: 'Tom', mouse: 'Jerry' }
hash.sample # => 'Tom'
</code></pre>
<p>(Sorry, I loved Tom and Jerry when I was a kid so I use this as<br>
my main Hash a lot.)</p>
<p>Note that in the above Hash, you could also create a new sub-hash<br>
such as:</p>
<pre><code>hash = { cat: 'Tom', mouse: 'Jerry' }
hash.sample # => { :cat => 'Tom' }
</code></pre>
<p>I don't mind either way, both is fine by me. The "will return a<br>
hash" is probably more consistent because class Array .sample()<br>
method will return an Array. So I guess that is the better<br>
variant.</p>
<p>The main thing for me is that a method .sample could be used on<br>
class Hash, similar to class Array. If it looks like a duck and<br>
quacks like a duck ... it may be a cat pretending to be a duck!<br>
Or it may be a duck indeed. But both are animals anyway.</p>
<p>Admittedly the above .sample() for hash is sort of more a method<br>
like .random() - that is, we return a random element. But this<br>
is how class Array's sample() already works too, right?</p>
<p>Here is the documentation:</p>
<pre><code>https://ruby-doc.org/core-2.2.0/Array.html#method-i-sample
</code></pre>
<p>The documentation for .sample() states:</p>
<p>"Choose a random element or n random elements from the array."</p>
<p>So you could also actually name it .random perhaps but maybe<br>
.sample() was a better name, I have no idea myself. It probably<br>
is now established and used by ruby hackers so we can stick to<br>
.sample() anyway.</p>
<p>That documentation also has an example, which I translated or<br>
simplified a bit:</p>
<pre><code>array = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
array.sample # => 7
array.sample(2) # => [6, 5]
</code></pre>
<p>I assume that for the most similar behaviour, I should picture<br>
something like this, also returning a "smaller" random representation<br>
of the given Hash:</p>
<pre><code>hash = { cat: 'Tom', mouse: 'Jerry', duck: 'Timmy', horse: 'Pete' }
hash.sample(2) # => { duck: 'Timmy', horse: 'Pete' }
hash.sample(2) # => { cat: 'Tom', horse: 'Pete' }
</code></pre>
<p>(I guess hash.random(2) and array.random(2) might also be used to<br>
illustrate the concept, but it should be the same name to avoid<br>
confusion; since class Array already has .sample(), I would like<br>
to suggest this for class Hash).</p>
<p>Do note that the above is already easily possible - just obtain<br>
all keys from hash, then apply .sample(), then query the hash<br>
itself again to return a hash.</p>
<p>Example again showing only 2 sample results:</p>
<pre><code>hash = { cat: 'Tom', mouse: 'Jerry', duck: 'Timmy', horse: 'Pete' }
keys = hash.keys
sample = keys.sample(2) # => [:duck, :cat]
values = hash.values_at(*sample) # => ["Timmy", "Tom"]
Hash[*sample.zip(values).flatten] # => {:duck=>"Timmy", :cat=>"Tom"}
</code></pre>
<p>So this is already possible but a bit cumbersome in my opinion. With<br>
a .sample() method this would be easier to use and re-use.</p>
<p>No idea if this is a good suggestion or something that can not be<br>
added for any reason but I wanted to propose it at the least, in the<br>
event that nobody else has done so. If it was already proposed before,<br>
sorry for not finding it; feel free to link it into the other<br>
proposal and close the request here in that latter case.</p>
<p>Thank you for reading - may ruby save many more ducks in the<br>
future.</p> Ruby master - Feature #12746 (Closed): class Array: alias .prepend to .unshift ?https://redmine.ruby-lang.org/issues/127462016-09-09T20:59:24Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>This code works:</p>
<pre><code>array = %w( b c ) # => ["b", "c"]
array.unshift "a"
array # => ["a", "b", "c"]
</code></pre>
<p>I would like for .prepend to also work on class Array.</p>
<p>Rationale:</p>
<p>I found myself to sometimes .prepend to a String object<br>
in Ruby, which works very well.</p>
<p>Sometimes I do not want to care whether I have a String<br>
or an Array, I just want to prepend stuff (add to the<br>
beginning).</p>
<p>I can do so via .unshift, fair enough, and I also can<br>
use [] such as:</p>
<pre><code>array[0,0] = 'a'
</code></pre>
<p>Which works on both class String and Array.</p>
<p>Since class Hash is sorted (kept in order) these days,<br>
perhaps they can also use a .prepend variant, which<br>
either works for prepending both a key-value pair,<br>
or optionally, to make the value default to nil and<br>
just provide a key (if the user does not need to<br>
specify a specific value) such as:</p>
<pre><code>hash.prepend :cat
hash.prepend cat: :Tom
</code></pre>
<p>But primarily, I only ask for class Array since I<br>
have had use cases for class Array; I did not yet<br>
have a similar use case for class Hash.</p>
<p>Feel free to close this if it is considered unwanted<br>
for any reason!</p> Ruby master - Feature #12721 (Rejected): public_module_functionhttps://redmine.ruby-lang.org/issues/127212016-09-03T05:08:45Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby core,</p>
<p>This is about <code>module_function()</code>. As the documentation rightfully<br>
states, it adds a private method when included ("mixed in") into<br>
a class.</p>
<p>The following code shows that this works:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">module</span> <span class="nn">Foo</span>
<span class="kp">module_function</span>
<span class="k">def</span> <span class="nf">hi</span>
<span class="nb">puts</span> <span class="s1">'hi from method hi() in module Foo'</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">class</span> <span class="nc">Bar</span>
<span class="kp">include</span> <span class="no">Foo</span>
<span class="k">def</span> <span class="nf">test</span>
<span class="n">hi</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="no">Bar</span><span class="p">.</span><span class="nf">new</span><span class="p">.</span><span class="nf">test</span> <span class="c1"># This works</span>
<span class="no">Bar</span><span class="p">.</span><span class="nf">new</span><span class="p">.</span><span class="nf">hi</span> <span class="c1"># This here leads to an error message "private method `hi' called"</span>
</code></pre>
<p>I am sure that the private method by default makes sense, but<br>
I wondered in those case where I would like the above to be<br>
a public variant.</p>
<p>Is there some functionality like <code>module_function</code> but that<br>
works as a public method instead? So that the last example,<br>
<code>Bar.new.hi</code>, would also work?</p>
<p>Something like</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">public_module_function</span>
</code></pre>
<p>If I would have a public variant, I assume that I could get rid of<br>
"<code>def self.foo</code>" statements in some of my modules.</p> Ruby master - Feature #12715 (Feedback): Allow ruby hackers to omit having to specify class or mo...https://redmine.ruby-lang.org/issues/127152016-08-30T17:38:11Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello - I try to be somewhat short, as much as possible.</p>
<p>In ruby we have classes and modules. We can do module Foo; class Bar<br>
and also class Foo; module Bar. Both is slightly different, also in<br>
regards to errors you get when you try to extend either of these<br>
two. The problem here is that, when we wish to add new behaviour to<br>
a class or a module, we may have to know whether it is a class or a<br>
module explicitely.</p>
<p>If we do not specify this correctly so, we may get an error like this<br>
one here:</p>
<pre><code>Bar is not a class (TypeError)
</code></pre>
<p>I believe, however had, that it should not be absolutely mandatory to<br>
HAVE to know the type of a "class" or a "module", in particular not at<br>
runtime when all you want to do is add new behaviour to an already<br>
existing class or module. And if you know that class or module too.</p>
<p>I also believe that the current behaviour may not be changed for<br>
several reasons; backwards compatibility; also a user may have<br>
made a mistake or changed some class/module lateron, so we may<br>
have to catch these errors too. I have run into this every now<br>
and then e. g. when I had a standalone class in a project, but<br>
lateron modified this class to become a subclass of another class;<br>
then I also have to change the definitions for that class being<br>
a subclass in other .rb files (I tend to create several .rb files<br>
if my code becomes large, and some classes become really quite<br>
huge in some of my projects; ~more than 200 lines of code is<br>
already monster-sized in my opinion :) ).</p>
<p>It would be nice if we could, however had, have another way to<br>
modify the behaviour, in ruby.</p>
<p>I do not have a good suggestion here, so please, when you read<br>
the following, keep in mind that I am aware that this is not<br>
really perfect either - it just should serve as an illustration.</p>
<p>I will omit the "end"s to be more succinct.</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">module</span> <span class="nn">Foo</span><span class="p">;</span> <span class="k">class</span> <span class="nc">Bar</span><span class="p">;</span> <span class="k">def</span> <span class="nc">self</span><span class="o">.</span><span class="nf">hi</span><span class="p">;</span> <span class="nb">puts</span> <span class="s1">'hi from method hi()'</span>
</code></pre>
<p>Ok, now I want to modify inner class Bar without having to care<br>
whether it is a class or a module so I will use the word "modify"<br>
as well:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">modify</span> <span class="no">Foo</span><span class="o">::</span><span class="no">Bar</span><span class="p">;</span> <span class="k">def</span> <span class="nc">self</span><span class="o">.</span><span class="nf">new_method</span><span class="p">;</span> <span class="nb">puts</span> <span class="s1">'a new method!'</span>
</code></pre>
<p>Here I would have used the (then new) keyword "modify".</p>
<p>I think the name somewhat fits. One could use other names, perhaps.</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">adapt</span> <span class="no">Foo</span><span class="o">::</span><span class="no">Bar</span><span class="p">;</span> <span class="k">def</span> <span class="nc">self</span><span class="o">.</span><span class="nf">new_method</span><span class="p">;</span> <span class="nb">puts</span> <span class="s1">'a new method!'</span>
<span class="n">mod</span> <span class="no">Foo</span><span class="o">::</span><span class="no">Bar</span><span class="p">;</span> <span class="k">def</span> <span class="nc">self</span><span class="o">.</span><span class="nf">new_method</span><span class="p">;</span> <span class="nb">puts</span> <span class="s1">'a new method!'</span>
<span class="n">change</span> <span class="no">Foo</span><span class="o">::</span><span class="no">Bar</span><span class="p">;</span> <span class="k">def</span> <span class="nc">self</span><span class="o">.</span><span class="nf">new_method</span><span class="p">;</span> <span class="nb">puts</span> <span class="s1">'a new method!'</span>
<span class="n">update</span> <span class="no">Foo</span><span class="o">::</span><span class="no">Bar</span><span class="p">;</span> <span class="k">def</span> <span class="nc">self</span><span class="o">.</span><span class="nf">new_method</span><span class="p">;</span> <span class="nb">puts</span> <span class="s1">'a new method!'</span>
</code></pre>
<p>Though I like modify as name more than the other variants.</p>
<p>I think that this probably has not a huge chance to be implemented,<br>
most likely not for ruby 3.x; perhaps in the very distant future<br>
towards ruby 4.x?</p>
<p>But I think the main reason why I actually wrote this suggestion<br>
here, even though it probably does not have a huge chance to be<br>
implemented, is mostly just to point out that I think I should not<br>
have to be explicit about the class versus module dichotomy here when<br>
all I want to do is really just add a class/module method (singleton<br>
method?) to in particular already existing ruby classes/modules.</p>
<p>I do have to know whether it is a class or a module right now,<br>
because in one way, it will work, in the other it will fail.</p>
<p>So my suggestion above would eliminate the possibility of the error,<br>
simply by telling ruby "no matter if it is a class or a module,<br>
simply add the code to it" and ruby can infer internally whether<br>
it is a class or a module via a check.</p>
<p>I am not sure if any of this makes sense - I may have forgotten<br>
some other things too - but thank you for reading it anyway!</p> Ruby master - Feature #12635 (Rejected): Shuffling/Reassigning "namespaces" more easilyhttps://redmine.ruby-lang.org/issues/126352016-07-29T11:55:56Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Push a namespace into another namespace</p>
<p>Hello.</p>
<p>Consider this code here:</p>
<pre><code>class Konsole; def initialize; puts 'hello world'; end; end
</code></pre>
<p>This may reside in a file called konsole.rb</p>
<p>So far so fine. Now, as more and more other projects are required,<br>
the ruby developer may not want to have a toplevel class called<br>
Konsole. There are other examples, such as "module Config" or<br>
"module Configuration"; also see the change towards RbConfig, which<br>
I assume happened to not too easily conflict with a Config namespace.</p>
<p>Anyway, the ruby developer would like to shuffle this namespace into<br>
another one so that the toplevel "Konsole" goes away.</p>
<p>This is already possible in ruby code, I think.</p>
<p>We can add:</p>
<pre><code>module Foobar; end
</code></pre>
<p>And then put Konsole into the module Foobar "namespace", possibly<br>
so, like via this line here:</p>
<pre><code>module Foobar; Konsole = ::Konsole; end
</code></pre>
<p>And then delete the old namespace via:</p>
<pre><code>Object.send :remove_const, :Konsole
</code></pre>
<p>Then we can instantiate it still and I verified that this works:</p>
<pre><code>konsole = Foobar::Konsole.new
</code></pre>
<p>The following code demonstrates this; the last line is the one<br>
that will fail, which was what we wanted to achieve (to get<br>
rid of toplevel class Konsole):</p>
<pre><code>class Konsole; def initialize; puts 'hello world'; end; end
module Foobar; end
module Foobar; Konsole = ::Konsole; end
Object.send :remove_const, :Konsole
konsole = Foobar::Konsole.new
Konsole.new
</code></pre>
<p>So if you look at the above code, all I am doing here is basically<br>
to define a class and a module, and then "putting" the toplevel<br>
class Konsole into that module "namespace"; and then using :remove_const<br>
to get rid of the toplevel Konsole.</p>
<p>So far so fine, we can already do so in ruby.</p>
<p>But! I was thinking that this is a bit cumbersome. I am not sure if<br>
anyone ever wants to have this, but just in the event that others<br>
may wish to reshuffle namespaces more easily, perhaps there could<br>
be some API to support this.</p>
<p>I can not think of a good name - giving things a proper name is one<br>
of the hardest task in programming. :)</p>
<p>Perhaps we could add a new module called Namespace or something<br>
for ruby 3.x or some other name. Or it could be added to Kernel or<br>
Object, but I am not sure - it probably would not belong to either<br>
that. Or we could have a new module where we can add lots of fancy<br>
tricks, a bit like the old evil.rb and so forth. (Or like the<br>
did-you-mean gem showed, with extra requires such as the<br>
require 'did_you_mean/experimental' or require 'evil' haha, sorry,<br>
I just like the name evil)</p>
<p>A few examples could be:</p>
<pre><code>module Foobar; end # First we must create the new namespace.
Konsole.relocate to: Foobar
</code></pre>
<p>Might be a good name perhaps? Not sure.</p>
<p>With Namespace, it could be:</p>
<pre><code>Namespace.assign Konsole, to: Foobar
Namespace.push Konsole, to: Foobar
</code></pre>
<p>Might be better, not sure.</p>
<p>Note that the above line, would also perform the above actions:</p>
<pre><code>- Push the "namespace" Konsole into Foobar
- Delete the toplevel Konsole (or, if we want to make
this more general, to get rid of wherever it is defined)
</code></pre>
<p>Anyway! I think it may perhaps be not worth to implement this, but<br>
I still thought that I could make the suggestion at the least.</p>
<p>Perhaps it also helps the generation of new, other ideas.</p>
<p>I assume that in the long run, with other ideas such as "isolated changes"<br>
being possible to "namespaces" (constants), like via refinements, and matz<br>
saying that the path to ruby 3.x is still open (aka no feature freezes and<br>
no "idea freezes"), I thought it is ok to suggest it even if it can not<br>
be implemented. :)</p>
<p>Thanks for reading!</p>
<p>May ruby make people happier.</p>
<p>PS:</p>
<p>I also was thinking of making this here:</p>
<pre><code>Object.send :remove_const, :Foobar
</code></pre>
<p>Perhaps somewhat easier to read.</p>
<p>Object.remove_const :Foobar</p>
<p>The last line there does not work because it is a private method. Unfortunately,<br>
I again have the problem that I can not think of a better name either.</p>
<p>Perhaps:</p>
<pre><code>Object.delete_namespace
Object.delete_constant
</code></pre>
<p>Or some other name.</p>
<p>I simply found the .send() variant a bit verbose. Anyway, I digress, I am<br>
using it here and there. :)</p> Ruby master - Feature #12591 (Rejected): Allow ruby to either catch misspelled "ailas" statements...https://redmine.ruby-lang.org/issues/125912016-07-18T05:10:50Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello ruby-core team.</p>
<p>I lately had a strange error message.</p>
<p>The code was like this (I made a shorter example so that you<br>
can reproduce it):</p>
<pre><code>class Foo
def bar
puts 'This is hello world from method bar().'
end; alias bar1 bar
ailas bar2 bar
end
foo = Foo.new
foo.bar1
foo.bar2
</code></pre>
<p>(If you want to copy/paste from another site, here is a link to<br>
gist github with the above code):</p>
<pre><code>https://gist.githubusercontent.com/shevegen/7bfb8cce3f191d5ba7372fc5b23924f7/raw/72057e89ae824c2792328d8ab09c364054104add/wrong_alias.rb
</code></pre>
<p>Now, I saved this as the file foo.rb and had ruby evaluate/execute<br>
this file, and the error I got was this one here:</p>
<pre><code>foo.rb:8:in `<class:Foo>': undefined local variable or method `bar' for Foo:Class (NameError)
</code></pre>
<p>However had, as you can see above, the name "ailas" was a typo.</p>
<p>I meant to write "alias". This is now another small typo that<br>
I did; in the past I also wrote "def intialize", thankfully we<br>
now have the did-you-mean-it gem.</p>
<p>So I was trying to see if this gem might help here as well.</p>
<p>The gem author Yuki Nishijima has given an example:</p>
<pre><code>https://github.com/yuki24/did_you_mean#correcting-an-instance-variable-when-its-incorrectly-typed
</code></pre>
<p>So let's try this via:</p>
<pre><code>require 'did_you_mean/experimental'
</code></pre>
<p>(I think I had to do a "gem install did_you_mean", experimental.rb is<br>
perhaps not part of default ruby. But this is an aside, after the<br>
gem install, the above require statement worked.)</p>
<p>The error still is the same, though:</p>
<pre><code>foo.rb:8:in `<class:Foo>': undefined local variable or method `bar' for Foo:Class (NameError)
</code></pre>
<p>As you can see, if you replace "ailas" with "ailas" then the error<br>
will go away. But I was thinking that ruby tells me the wrong error<br>
message here, in this case. bar() actually already exists, but what<br>
does not exist is the word "ailas", only "alias". I assume that it<br>
may not be very trivial to make this available for error reporting<br>
BUT it also is a typo that I have made, and so I thought I would<br>
report it.</p>
<p>I would feel that either ruby by default should catch this error,<br>
or perhaps make a better evaluation of the line (an error message<br>
such as "mispelled alias" would be nice but I also understand<br>
that this feature is possibly unwanted to enable by default,<br>
since in all those cases where no typo is in code, it would be<br>
wasted CPU time) or possibly with the experimental feature of<br>
the did_you_mean gem.</p>
<p>I do not know how simple it would be to implement it or if this<br>
has been reported already, but in the event that it has already<br>
been reported, it may be better to report it more than once rather<br>
than zero times.</p>
<p>Thanks.</p>
<p>PS: I filed this under features, because it probably is not a<br>
bug in the sense that the behaviour would be wrong; I just consider<br>
the error reporting in this context not perfect either, so I<br>
proposed it as a new feature or more accurately a feature change.</p> Ruby master - Feature #12586 (Open): Hash#samplehttps://redmine.ruby-lang.org/issues/125862016-07-14T07:58:00Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello.</p>
<p>class Array has .sample method.</p>
<p>I tried to use .sample on a hash, just to return a random element (I needed to<br>
debug this in my key, from a list of hash-kept remote URLs where I will batch<br>
download these files via a ruby script).</p>
<p>To my surprise, class Hash has no .sample. I am not sure why not, perhaps there<br>
is some logical reason, but perhaps it may also have been forgotten?</p>
<p>I am using this code as workaround:</p>
<pre><code>hash = { :cat => 'Tom', :mouse => 'Jerry', :dog => 'Spike'}
hash.to_a.sample(1).to_h # => {:mouse=>"Jerry"}
hash.to_a.sample(1).to_h # => {:cat=>"Tom"}
</code></pre>
<p>This works fine. I could also modify class Hash of course but<br>
I rather want to stick to main-ruby (and thus not modify core<br>
classes of ruby if I release my code via gems).</p>
<p>I did not need any argument other than 1 to .sample() since<br>
I only needed to obtain one random hash key-value pair.</p>
<p>If this was already discussed or suggested and rejected, feel<br>
free to close this issue request. Thanks!</p> Ruby master - Feature #12455 (Open): Add a way for class String to determine whether it has only ...https://redmine.ruby-lang.org/issues/124552016-06-02T16:37:18Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello.</p>
<p>Not sure if that has been suggested before. If it was and not deemed fit,<br>
please feel free to close this issue request here.</p>
<p>For class String, would it be possible to find out if a given String<br>
contains only numbers, without having to do a regex check?</p>
<pre><code>x = '123'
</code></pre>
<p>A regex will do of course:</p>
<pre><code>if x =~ /^\d+$/
</code></pre>
<p>I was wondering if we could have a method that does something similar,<br>
that is also easier to read.</p>
<p>Something like:</p>
<pre><code>x = '123'
x.only_numbers?
</code></pre>
<p>or</p>
<pre><code>x.only_digits?
</code></pre>
<p>Something like that.</p>
<p>I do not know whether the word "only" is good or not. Perhaps ".all_numbers?"<br>
or ".all_digits?" would be better. But the name is secondary probably, more<br>
important would be whether such a method would make sense for class String.</p>
<p>I am more interested in a method that will help avoid the use of a regex here.</p>
<p>The method should return true if the string has only numbers, and false<br>
otherwise.</p>
<p>Anyway, thanks for reading!</p> Ruby master - Misc #12365 (Closed): [DOC] Suggestion to change FileUtils.compare_filehttps://redmine.ruby-lang.org/issues/123652016-05-10T07:37:01Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello.</p>
<p>The documentation at:</p>
<p><a href="http://ruby-doc.org/stdlib-2.3.1/libdoc/fileutils/rdoc/FileUtils.html#method-c-compare_file" class="external">http://ruby-doc.org/stdlib-2.3.1/libdoc/fileutils/rdoc/FileUtils.html#method-c-compare_file</a></p>
<p>shows the "return" value in the second example to be:</p>
<p>#=> maybe false</p>
<p>I am not sure what this means, so my suggestion would be to instead, get<br>
rid of the "maybe" part there and stick just to "false". And to instead<br>
document above the method definition, under which circumstance can the<br>
second check return false, e. g. via examples or just by explanation.</p>
<p>I found a return value of "maybe false" confusing.</p> Ruby master - Bug #12233 (Closed): Please consider adding documentation to DateTime, one line, re...https://redmine.ruby-lang.org/issues/122332016-03-30T17:52:27Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>The ruby DateTime page does not include this line:</p>
<p>require 'date'</p>
<p>It just happened on IRC right now (I edited/truncated a bit here):</p>
<pre><code><schemanic> Can anyone tell me why in irb Date/Time/DateTime gives me NameError: uninitialized constant DateTime
<apeiros> schemanic: because you forgot to require 'date'?
<apeiros> though, Time in that list won't give you a NameError
<schemanic> sigh. Okay. I'm sorry - the Ruby doc code example didn't have the requirement statement
</code></pre>
<p>The documentation can be found here:</p>
<pre><code>http://ruby-doc.org/stdlib/libdoc/date/rdoc/DateTime.html
http://ruby-doc.org/stdlib-2.3.0/libdoc/date/rdoc/DateTime.html
</code></pre>
<p>I suggest to add the require 'date' close to the top of that page, to help newcomers not be too<br>
confused about how to use it.</p>
<p>PS: On a side note, perhaps another subsection could be added to the ruby bug/issue tracker here, a subsection<br>
solely for docs? That way, people could report suggestions to improve the documentation there. Anyway that's<br>
just a semi-random suggestion. :)</p> Ruby master - Feature #12038 (Third Party's Issue): Please add documentation to open-uri showing ...https://redmine.ruby-lang.org/issues/120382016-01-30T10:45:30Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>The current documentation for open-uri is at:</p>
<p>ruby-doc.org/stdlib-2.3.0/libdoc/open-uri/rdoc/OpenURI.html</p>
<p>I am trying to download:</p>
<p><a href="http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=189458859&rettype=fasta&retmode=text" class="external">http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=189458859&rettype=fasta&retmode=text</a></p>
<p>This gives a text file (fasta file) which has sequence information for a human gene.</p>
<p>With open-uri I get this metadata:</p>
<p>#<StringIO:0xb863bd6c<br>
@base_uri=<br>
#<URI::HTTP <a href="http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=189458859&rettype=fasta&retmode=text%3E" class="external">http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=189458859&rettype=fasta&retmode=text></a>,<br>
<a class="user active user-mention" href="https://redmine.ruby-lang.org/users/813">@meta (mathew murphy)</a>=<br>
{"date"=>"Sat, 30 Jan 2016 10:37:29 GMT",<br>
"server"=>"Apache",<br>
"access-control-allow-origin"=>"<em>",<br>
"cache-control"=>"private",<br>
"content-disposition"=>"attachment; filename=sequence.fasta",<br>
"ncbi-sid"=>"9DFD1FFC6AC92691_0807SID",<br>
"content-type"=>"text/plain",<br>
"set-cookie"=><br>
"ncbi_sid=9DFD1FFC6AC92691_0807SID; domain=.nih.gov; path=/; expires=Mon, 30 Jan 2017 10:37:29 GMT",<br>
"x-ua-compatible"=>"IE=Edge",<br>
"transfer-encoding"=>"chunked"},<br>
@metas=<br>
{"date"=>["Sat, 30 Jan 2016 10:37:29 GMT"],<br>
"server"=>["Apache"],<br>
"access-control-allow-origin"=>["</em>"],<br>
"cache-control"=>["private"],<br>
"content-disposition"=>["attachment; filename=sequence.fasta"],<br>
"ncbi-sid"=>["9DFD1FFC6AC92691_0807SID"],<br>
"content-type"=>["text/plain"],<br>
"set-cookie"=><br>
["ncbi_sid=9DFD1FFC6AC92691_0807SID; domain=.nih.gov; path=/; expires=Mon, 30 Jan 2017 10:37:29 GMT"],<br>
"x-ua-compatible"=>["IE=Edge"],<br>
"transfer-encoding"=>["chunked"]},<br>
@status=["200", "OK"]></p>
<p>I assume that the important part is:</p>
<p>"content-disposition"=>["attachment; filename=sequence.fasta"]</p>
<p>So there is an attachment.</p>
<p>I googled, found some stackoverflow answers; most refer to rails<br>
though but I want a pure ruby solution.</p>
<p>Now here is my request:</p>
<ul>
<li>Could someone show a simple example for the open-uri documentation<br>
in how users are able to obtain an attachment, if this fits to<br>
open-uri? (If it does not fit to open-uri, then this can be<br>
omitted; but if default ruby provides this, perhaps some documentation<br>
can be added for that).</li>
</ul>
<p>Thanks for reading anyway!</p> Ruby master - Feature #11781 (Open): Would it be possible to alias .prepend() towards .unshift() ...https://redmine.ruby-lang.org/issues/117812015-12-07T10:12:22Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello.</p>
<p>For Strings we can do:</p>
<pre><code>abc = 'world!'
abc[0,0] = 'Hello '
abc # => "Hello world!"
</code></pre>
<p>For Arrays we can do:</p>
<pre><code>abc = ['world!']
abc[0,0] = 'Hello '
abc # => ["Hello ", "world!"]
</code></pre>
<p>This is nice.</p>
<p>For Strings we can also use .prepend() to add to the beginning.</p>
<p>For Arrays, we have to use .unshift().</p>
<p>I have a hard time remembering .unshift though, .prepend() seems<br>
to be easier for me to remember.</p>
<p>I'd like to use both .prepend for Strings and Arrays; right now<br>
I have to use different names. I could alias prepend to unshift<br>
for class Array, but then I'd have to carry these modifications<br>
into my projects, which is not so good - I would prefer to just<br>
stick to what MRI is doing.</p>
<p>Could we have the alias .prepend() for class Array, meaning<br>
.unshift() too? That way I could use .prepend() for both Arrays<br>
and Strings.</p>
<p>Thanks for reading!</p> Ruby master - Bug #11495 (Closed): [Documentation] Please improve documentation for Regexp.new() ...https://redmine.ruby-lang.org/issues/114952015-08-29T23:04:59Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello,</p>
<p>The documentation at Regepx.new here:</p>
<pre><code>http://ruby-doc.org/core-2.2.3/Regexp.html#method-c-new
</code></pre>
<p>It shows a lot of information, in particular four ways to call it:</p>
<pre><code>new(string, [options [, kcode]]) -> regexp
new(regexp) -> regexp
compile(string, [options [, kcode]]) -> regexp
compile(regexp) -> regexp
</code></pre>
<p>However, the examples given do not show an example of where<br>
3 arguments are passed.</p>
<p>Today this came up on IRC where someone asked how to use<br>
respectively what the meaning of kcode is, via example.</p>
<p>Can someone add an example of where/when to use 3 arguments<br>
to this method please? Thank you.</p> Ruby master - Bug #11494 (Closed): Attempting to compile a static ruby 2.2.3 - build failurehttps://redmine.ruby-lang.org/issues/114942015-08-28T23:26:03Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello,</p>
<p>I would like to report a bug trying to compile ruby-2.2.3.</p>
<p>The URL from which I obtained this ruby is this:</p>
<pre><code>wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-2.2.3.tar.xz
</code></pre>
<p>I set a different CFLAGS:</p>
<pre><code>"-static -O2 -g"
</code></pre>
<p>Then I started to configure this ruby:</p>
<pre><code>./configure --prefix=/opt --disable-shared --enable-static
</code></pre>
<p>This worked for a while until I hit some error.</p>
<p>I will paste the lines before the error as well:</p>
<p>make[1]: Entering directory '/Depot/jjj/ruby-2.2.3'<br>
make[1]: Leaving directory '/Depot/jjj/ruby-2.2.3'<br>
generating makefile exts.mk<br>
Failed to configure -test-/win32/console. It will not be installed.<br>
Failed to configure -test-/win32/dln. It will not be installed.<br>
Failed to configure -test-/win32/dln/empty. It will not be installed.<br>
Failed to configure -test-/win32/fd_setsize. It will not be installed.<br>
Failed to configure dbm. It will not be installed.<br>
Failed to configure gdbm. It will not be installed.<br>
Failed to configure openssl. It will not be installed.<br>
configuring socket<br>
Failed to configure tk. It will not be installed.<br>
Failed to configure tk/tkutil. It will not be installed.<br>
Failed to configure win32. It will not be installed.<br>
Failed to configure win32ole. It will not be installed.<br>
make[1]: Entering directory '/Depot/jjj/ruby-2.2.3'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/-test-/win32/console'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/-test-/win32/console'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/-test-/win32/dln'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/-test-/win32/dln'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/-test-/win32/dln/empty'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/-test-/win32/dln/empty'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/-test-/win32/fd_setsize'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/-test-/win32/fd_setsize'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/bigdecimal'<br>
installing default bigdecimal libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/bigdecimal'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/date'<br>
installing default date_core libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/date'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/dbm'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/dbm'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/digest'<br>
installing digest libraries<br>
installing default digest libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/digest'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/digest/sha2'<br>
installing default sha2 libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/digest/sha2'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/fiddle'<br>
installing default fiddle libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/fiddle'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/gdbm'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/gdbm'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/io/console'<br>
installing default console libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/io/console'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/json'<br>
installing default libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/json'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/nkf'<br>
installing default nkf libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/nkf'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/openssl'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/openssl'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/pathname'<br>
installing default pathname libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/pathname'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/psych'<br>
installing default psych libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/psych'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/pty'<br>
installing default pty libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/pty'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/ripper'<br>
linking shared-object ripper.so<br>
installing default ripper libraries<br>
checking ../.././parse.y and ../.././ext/ripper/eventids2.c<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/ripper'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/socket'<br>
linking shared-object socket.so<br>
installing default socket libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/socket'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/syslog'<br>
installing default syslog libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/syslog'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/tk'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/tk'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/tk/tkutil'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/tk/tkutil'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/win32'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/win32'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/win32ole'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/win32ole'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3'<br>
make[2]: 'ruby' is up to date.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3'<br>
make[1]: Leaving directory '/Depot/jjj/ruby-2.2.3'<br>
Generating RDoc documentation<br>
/Depot/jjj/ruby-2.2.3/.ext/x86_64-linux/enc/encdb.so: [BUG] Segmentation fault at 0x00000000000000<br>
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]</p>
<p>-- Control frame information -----------------------------------------------<br>
c:0002 p:-2186426 s:0004 e:000003 TOP [FINISH]<br>
c:0001 p:0000 s:0002 E:0012b0 TOP [FINISH]</p>
<p>-- Machine register context ------------------------------------------------<br>
RIP: 0x0000000000000000 RBP: 0x00007f0f1ffa6060 RSP: 0x00007ffccf15b218<br>
RAX: 0x0000000000f2f810 RBX: 0x0000000000f2f810 RCX: 0xfffffffffffff000<br>
RDX: 0x0000000000001000 RDI: 0x0000000000000003 RSI: 0x0000000000000001<br>
R8: 0x0000000000000000 R9: 0x00007ffccf15b170 R10: 0xfffffffffffff009<br>
R11: 0x00007f0f200c3ee0 R12: 0x00007f0f1ffa6968 R13: 0x00007ffccf15ced8<br>
R14: 0x00000000010afbe0 R15: 0x0000000000000000 EFL: 0x0000000000010203</p>
<p>-- Other runtime information -----------------------------------------------</p>
<ul>
<li>
<p>Loaded script: ./ruby</p>
</li>
<li>
<p>Loaded features:</p>
<p>0 enumerator.so<br>
1 rational.so<br>
2 complex.so</p>
</li>
<li>
<p>Process memory map:</p>
</li>
</ul>
<p>00400000-007f4000 r-xp 00000000 08:01 16206492 /Depot/jjj/ruby-2.2.3/ruby<br>
007f4000-007f7000 rw-p 003f3000 08:01 16206492 /Depot/jjj/ruby-2.2.3/ruby<br>
007f7000-00839000 rw-p 00000000 00:00 0<br>
00f2f000-010be000 rw-p 00000000 00:00 0 [heap]<br>
7f0f1f181000-7f0f1f281000 r-xp 00000000 08:01 23170456 /lib/x86_64-linux-gnu/libm-2.19.so<br>
7f0f1f281000-7f0f1f480000 ---p 00100000 08:01 23170456 /lib/x86_64-linux-gnu/libm-2.19.so<br>
7f0f1f480000-7f0f1f481000 r--p 000ff000 08:01 23170456 /lib/x86_64-linux-gnu/libm-2.19.so<br>
7f0f1f481000-7f0f1f482000 rw-p 00100000 08:01 23170456 /lib/x86_64-linux-gnu/libm-2.19.so<br>
7f0f1f482000-7f0f1f48a000 r-xp 00000000 08:01 23170428 /lib/x86_64-linux-gnu/libcrypt-2.19.so<br>
7f0f1f48a000-7f0f1f689000 ---p 00008000 08:01 23170428 /lib/x86_64-linux-gnu/libcrypt-2.19.so<br>
7f0f1f689000-7f0f1f68a000 r--p 00007000 08:01 23170428 /lib/x86_64-linux-gnu/libcrypt-2.19.so<br>
7f0f1f68a000-7f0f1f68b000 rw-p 00008000 08:01 23170428 /lib/x86_64-linux-gnu/libcrypt-2.19.so<br>
7f0f1f68b000-7f0f1f6b9000 rw-p 00000000 00:00 0<br>
7f0f1f6b9000-7f0f1f6bc000 r-xp 00000000 08:01 23170433 /lib/x86_64-linux-gnu/libdl-2.19.so<br>
7f0f1f6bc000-7f0f1f8bb000 ---p 00003000 08:01 23170433 /lib/x86_64-linux-gnu/libdl-2.19.so<br>
7f0f1f8bb000-7f0f1f8bc000 r--p 00002000 08:01 23170433 /lib/x86_64-linux-gnu/libdl-2.19.so<br>
7f0f1f8bc000-7f0f1f8bd000 rw-p 00003000 08:01 23170433 /lib/x86_64-linux-gnu/libdl-2.19.so<br>
7f0f1f8bd000-7f0f1f932000 r-xp 00000000 08:01 2348925 /usr/lib/libgmp.so.10.2.0<br>
7f0f1f932000-7f0f1fb31000 ---p 00075000 08:01 2348925 /usr/lib/libgmp.so.10.2.0<br>
7f0f1fb31000-7f0f1fb33000 rw-p 00074000 08:01 2348925 /usr/lib/libgmp.so.10.2.0<br>
7f0f1fb33000-7f0f1fb4b000 r-xp 00000000 08:01 23170495 /lib/x86_64-linux-gnu/libpthread-2.19.so<br>
7f0f1fb4b000-7f0f1fd4a000 ---p 00018000 08:01 23170495 /lib/x86_64-linux-gnu/libpthread-2.19.so<br>
7f0f1fd4a000-7f0f1fd4b000 r--p 00017000 08:01 23170495 /lib/x86_64-linux-gnu/libpthread-2.19.so<br>
7f0f1fd4b000-7f0f1fd4c000 rw-p 00018000 08:01 23170495 /lib/x86_64-linux-gnu/libpthread-2.19.so<br>
7f0f1fd4c000-7f0f1fd50000 rw-p 00000000 00:00 0<br>
7f0f1fd50000-7f0f1fd85000 r--p 00000000 08:01 2196460 /etc/ld.so.cache<br>
7f0f1fd85000-7f0f1fda5000 r-xp 00000000 08:01 23170411 /lib/x86_64-linux-gnu/ld-2.19.so<br>
7f0f1fda5000-7f0f1ffa5000 ---p 00020000 08:01 23170411 /lib/x86_64-linux-gnu/ld-2.19.so<br>
7f0f1ffa5000-7f0f1ffa6000 r--p 00020000 08:01 23170411 /lib/x86_64-linux-gnu/ld-2.19.so<br>
7f0f1ffa6000-7f0f1ffa7000 rw-p 00021000 08:01 23170411 /lib/x86_64-linux-gnu/ld-2.19.so<br>
7f0f1ffa7000-7f0f1ffa8000 rw-p 00000000 00:00 0<br>
7f0f1ffa8000-7f0f20147000 r-xp 00000000 08:01 23170424 /lib/x86_64-linux-gnu/libc-2.19.so<br>
7f0f20147000-7f0f20347000 ---p 0019f000 08:01 23170424 /lib/x86_64-linux-gnu/libc-2.19.so<br>
7f0f20347000-7f0f2034b000 r--p 0019f000 08:01 23170424 /lib/x86_64-linux-gnu/libc-2.19.so<br>
7f0f2034b000-7f0f2034d000 rw-p 001a3000 08:01 23170424 /lib/x86_64-linux-gnu/libc-2.19.so<br>
7f0f2034d000-7f0f20351000 rw-p 00000000 00:00 0<br>
7f0f20382000-7f0f20383000 rw-p 00000000 00:00 0<br>
7f0f20383000-7f0f20385000 r-xp 00000000 08:01 16975209 /Depot/jjj/ruby-2.2.3/.ext/x86_64-linux/enc/encdb.so<br>
7f0f20385000-7f0f20386000 rw-p 00001000 08:01 16975209 /Depot/jjj/ruby-2.2.3/.ext/x86_64-linux/enc/encdb.so<br>
7f0f20386000-7f0f20388000 r-xp 00000000 08:01 2393363 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so<br>
7f0f20388000-7f0f20587000 ---p 00002000 08:01 2393363 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so<br>
7f0f20587000-7f0f20588000 r--p 00001000 08:01 2393363 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so<br>
7f0f20588000-7f0f20589000 rw-p 00002000 08:01 2393363 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so<br>
7f0f20589000-7f0f20590000 r--s 00000000 08:01 2393419 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache<br>
7f0f20590000-7f0f20591000 ---p 00000000 00:00 0<br>
7f0f20591000-7f0f20695000 rw-p 00000000 00:00 0 [stack:9028]<br>
7f0f20695000-7f0f2085a000 r--p 00000000 08:01 2355779 /usr/lib/locale/locale-archive<br>
7f0f2085a000-7f0f2085c000 r--p 00000000 00:00 0 [vvar]<br>
7f0f2085c000-7f0f2085e000 r-xp 00000000 00:00 0 [vdso]<br>
7ffcce966000-7ffccf166000 rw-p 00000000 00:00 0<br>
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]</p>
<p>[NOTE]<br>
You may have encountered a bug in the Ruby interpreter or extension libraries.<br>
Bug reports are welcome.<br>
For details: <a href="http://www.ruby-lang.org/bugreport.html" class="external">http://www.ruby-lang.org/bugreport.html</a></p>
<p>Aborted<br>
uncommon.mk:427: recipe for target 'rdoc' failed<br>
make: *** [rdoc] Error 134</p>
<p>I then tried again by adding these two options:</p>
<pre><code>--disable-install-rdoc --disable-install-doc
</code></pre>
<p>The error was a bit different this time:</p>
<p>installing default ripper libraries<br>
checking ../.././parse.y and ../.././ext/ripper/eventids2.c<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/ripper'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/socket'<br>
installing default socket libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/socket'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/syslog'<br>
installing default syslog libraries<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/syslog'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/tk'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/tk'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/tk/tkutil'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/tk/tkutil'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/win32'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/win32'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3/ext/win32ole'<br>
make[2]: Nothing to be done for 'all'.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3/ext/win32ole'<br>
make[2]: Entering directory '/Depot/jjj/ruby-2.2.3'<br>
make[2]: 'ruby' is up to date.<br>
make[2]: Leaving directory '/Depot/jjj/ruby-2.2.3'<br>
make[1]: Leaving directory '/Depot/jjj/ruby-2.2.3'<br>
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc"<br>
/Depot/jjj/ruby-2.2.3/.ext/x86_64-linux/enc/encdb.so: [BUG] Segmentation fault at 0x00000000000000<br>
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]</p>
<p>-- Control frame information -----------------------------------------------<br>
c:0002 p:-2157244 s:0004 e:000003 TOP [FINISH]<br>
c:0001 p:0000 s:0002 E:000530 TOP [FINISH]</p>
<p>-- Machine register context ------------------------------------------------<br>
RIP: 0x0000000000000000 RBP: 0x00007fb49b5ef060 RSP: 0x00007ffe6c6a2d68<br>
RAX: 0x0000000000ef6810 RBX: 0x0000000000ef6810 RCX: 0xfffffffffffff000<br>
RDX: 0x0000000000001000 RDI: 0x0000000000000003 RSI: 0x0000000000000001<br>
R8: 0x0000000000000000 R9: 0x00007ffe6c6a2cc0 R10: 0xfffffffffffff009<br>
R11: 0x00007fb49b70cee0 R12: 0x00007fb49b5ef968 R13: 0x00007ffe6c6a4a20<br>
R14: 0x0000000001076bf0 R15: 0x0000000000000000 EFL: 0x0000000000010203</p>
<p>-- Other runtime information -----------------------------------------------</p>
<ul>
<li>
<p>Loaded script: ./ruby</p>
</li>
<li>
<p>Loaded features:</p>
<p>0 enumerator.so<br>
1 rational.so<br>
2 complex.so</p>
</li>
<li>
<p>Process memory map:</p>
</li>
</ul>
<p>00400000-007f4000 r-xp 00000000 08:01 16206485 /Depot/jjj/ruby-2.2.3/ruby<br>
007f4000-007f7000 rw-p 003f3000 08:01 16206485 /Depot/jjj/ruby-2.2.3/ruby<br>
007f7000-00839000 rw-p 00000000 00:00 0<br>
00ef6000-01085000 rw-p 00000000 00:00 0 [heap]<br>
7fb49a7ca000-7fb49a8ca000 r-xp 00000000 08:01 23170456 /lib/x86_64-linux-gnu/libm-2.19.so<br>
7fb49a8ca000-7fb49aac9000 ---p 00100000 08:01 23170456 /lib/x86_64-linux-gnu/libm-2.19.so<br>
7fb49aac9000-7fb49aaca000 r--p 000ff000 08:01 23170456 /lib/x86_64-linux-gnu/libm-2.19.so<br>
7fb49aaca000-7fb49aacb000 rw-p 00100000 08:01 23170456 /lib/x86_64-linux-gnu/libm-2.19.so<br>
7fb49aacb000-7fb49aad3000 r-xp 00000000 08:01 23170428 /lib/x86_64-linux-gnu/libcrypt-2.19.so<br>
7fb49aad3000-7fb49acd2000 ---p 00008000 08:01 23170428 /lib/x86_64-linux-gnu/libcrypt-2.19.so<br>
7fb49acd2000-7fb49acd3000 r--p 00007000 08:01 23170428 /lib/x86_64-linux-gnu/libcrypt-2.19.so<br>
7fb49acd3000-7fb49acd4000 rw-p 00008000 08:01 23170428 /lib/x86_64-linux-gnu/libcrypt-2.19.so<br>
7fb49acd4000-7fb49ad02000 rw-p 00000000 00:00 0<br>
7fb49ad02000-7fb49ad05000 r-xp 00000000 08:01 23170433 /lib/x86_64-linux-gnu/libdl-2.19.so<br>
7fb49ad05000-7fb49af04000 ---p 00003000 08:01 23170433 /lib/x86_64-linux-gnu/libdl-2.19.so<br>
7fb49af04000-7fb49af05000 r--p 00002000 08:01 23170433 /lib/x86_64-linux-gnu/libdl-2.19.so<br>
7fb49af05000-7fb49af06000 rw-p 00003000 08:01 23170433 /lib/x86_64-linux-gnu/libdl-2.19.so<br>
7fb49af06000-7fb49af7b000 r-xp 00000000 08:01 2348925 /usr/lib/libgmp.so.10.2.0<br>
7fb49af7b000-7fb49b17a000 ---p 00075000 08:01 2348925 /usr/lib/libgmp.so.10.2.0<br>
7fb49b17a000-7fb49b17c000 rw-p 00074000 08:01 2348925 /usr/lib/libgmp.so.10.2.0<br>
7fb49b17c000-7fb49b194000 r-xp 00000000 08:01 23170495 /lib/x86_64-linux-gnu/libpthread-2.19.so<br>
7fb49b194000-7fb49b393000 ---p 00018000 08:01 23170495 /lib/x86_64-linux-gnu/libpthread-2.19.so<br>
7fb49b393000-7fb49b394000 r--p 00017000 08:01 23170495 /lib/x86_64-linux-gnu/libpthread-2.19.so<br>
7fb49b394000-7fb49b395000 rw-p 00018000 08:01 23170495 /lib/x86_64-linux-gnu/libpthread-2.19.so<br>
7fb49b395000-7fb49b399000 rw-p 00000000 00:00 0<br>
7fb49b399000-7fb49b3ce000 r--p 00000000 08:01 2196460 /etc/ld.so.cache<br>
7fb49b3ce000-7fb49b3ee000 r-xp 00000000 08:01 23170411 /lib/x86_64-linux-gnu/ld-2.19.so<br>
7fb49b3ee000-7fb49b5ee000 ---p 00020000 08:01 23170411 /lib/x86_64-linux-gnu/ld-2.19.so<br>
7fb49b5ee000-7fb49b5ef000 r--p 00020000 08:01 23170411 /lib/x86_64-linux-gnu/ld-2.19.so<br>
7fb49b5ef000-7fb49b5f0000 rw-p 00021000 08:01 23170411 /lib/x86_64-linux-gnu/ld-2.19.so<br>
7fb49b5f0000-7fb49b5f1000 rw-p 00000000 00:00 0<br>
7fb49b5f1000-7fb49b790000 r-xp 00000000 08:01 23170424 /lib/x86_64-linux-gnu/libc-2.19.so<br>
7fb49b790000-7fb49b990000 ---p 0019f000 08:01 23170424 /lib/x86_64-linux-gnu/libc-2.19.so<br>
7fb49b990000-7fb49b994000 r--p 0019f000 08:01 23170424 /lib/x86_64-linux-gnu/libc-2.19.so<br>
7fb49b994000-7fb49b996000 rw-p 001a3000 08:01 23170424 /lib/x86_64-linux-gnu/libc-2.19.so<br>
7fb49b996000-7fb49b99a000 rw-p 00000000 00:00 0<br>
7fb49b9cb000-7fb49b9cc000 rw-p 00000000 00:00 0<br>
7fb49b9cc000-7fb49b9ce000 r-xp 00000000 08:01 16975195 /Depot/jjj/ruby-2.2.3/.ext/x86_64-linux/enc/encdb.so<br>
7fb49b9ce000-7fb49b9cf000 rw-p 00001000 08:01 16975195 /Depot/jjj/ruby-2.2.3/.ext/x86_64-linux/enc/encdb.so<br>
7fb49b9cf000-7fb49b9d1000 r-xp 00000000 08:01 2393363 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so<br>
7fb49b9d1000-7fb49bbd0000 ---p 00002000 08:01 2393363 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so<br>
7fb49bbd0000-7fb49bbd1000 r--p 00001000 08:01 2393363 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so<br>
7fb49bbd1000-7fb49bbd2000 rw-p 00002000 08:01 2393363 /usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so<br>
7fb49bbd2000-7fb49bbd9000 r--s 00000000 08:01 2393419 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache<br>
7fb49bbd9000-7fb49bbda000 ---p 00000000 00:00 0<br>
7fb49bbda000-7fb49bcde000 rw-p 00000000 00:00 0<br>
7fb49bcde000-7fb49bea3000 r--p 00000000 08:01 2355779 /usr/lib/locale/locale-archive<br>
7ffe6beae000-7ffe6c6ae000 rw-p 00000000 00:00 0 [stack]<br>
7ffe6c709000-7ffe6c70b000 r--p 00000000 00:00 0 [vvar]<br>
7ffe6c70b000-7ffe6c70d000 r-xp 00000000 00:00 0 [vdso]<br>
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]</p>
<p>[NOTE]<br>
You may have encountered a bug in the Ruby interpreter or extension libraries.<br>
Bug reports are welcome.<br>
For details: <a href="http://www.ruby-lang.org/bugreport.html" class="external">http://www.ruby-lang.org/bugreport.html</a></p>
<p>Aborted<br>
uncommon.mk:253: recipe for target 'do-install-nodoc' failed<br>
make: *** [do-install-nodoc] Error 134</p>
<p>My host system:</p>
<h1>========================================================================<br>
Operating System: GNU/Linux<br>
OS Bit Type: x86_64<br>
CPU Model: Intel(R) Celeron(R) CPU G1630 @ 2.80GHz, 2 cores<br>
CFLAGS in use: -static -O2 -g<br>
RAM: 7880212 kB RAM (7695.5 MB) (7.5 Gig)<br>
Screen Resolution: 1920x1080<br>
Kernel Version: 4.0.0<br>
GCC Version: gcc version 5.2.0 (GCC)</h1> Ruby master - Feature #11227 (Feedback): May it be possible to add some symbols to IO.new() ?https://redmine.ruby-lang.org/issues/112272015-06-05T22:37:12Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello.</p>
<p><code>IO.new()</code> wants a number.</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">io</span> <span class="o">=</span> <span class="no">IO</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
</code></pre>
<p>Would it be possible or desirable to also allow symbols?</p>
<p>Such as:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="n">io</span> <span class="o">=</span> <span class="no">IO</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="ss">:stdout</span><span class="p">)</span>
</code></pre>
<p>The <code>:stdout</code> seems to make it slightly easier for me<br>
to remember which of the variants (0,1,2) is which<br>
(<code>stdin</code>, <code>stdout</code>, <code>stderr</code>).</p> Ruby master - Feature #11167 (Rejected): Allow an attr_ variant for query-methods that end with a...https://redmine.ruby-lang.org/issues/111672015-05-21T19:05:18Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi guys,</p>
<p>Hi nobu :)</p>
<p>Also hi matz if matz reads this, and of course the rest of the core<br>
team and everyone else.</p>
<p>Today on IRC, this mini-discussion happened (I show a snippet):</p>
<pre><code><apeiros> I really miss attr_query or whatever you want to name it
<apeiros> which would generate a ? method too
<jhass> apeiros: crystal has :P getter?
<apeiros> nice
</code></pre>
<p>Ok, so the language crystal has something ruby does not have.</p>
<p>We can't let those newcomers get away with making ruby look old<br>
now can we!</p>
<p>I use ruby not crystal but I very often use methods that end<br>
with a '?' query mark in ruby. It helps me in simple if clauses<br>
such as:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">if</span> <span class="nb">hash</span><span class="p">.</span><span class="nf">has_key?</span>
<span class="k">if</span> <span class="nb">hash</span><span class="p">.</span><span class="nf">key?</span>
<span class="k">if</span> <span class="n">cat</span><span class="p">.</span><span class="nf">is_hungry?</span>
</code></pre>
<p>(In the latter, it might be a cat of class <code>Cat</code> instance, with<br>
an instance variable called <code>@is_hungry</code>, and when the cat is<br>
fed with food, it is not hungry logically.)</p>
<p>We can generate these <code>@ivars</code> through <code>attr_</code>* right now as is<br>
already, such as:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="nb">attr_reader</span> <span class="ss">:foo</span>
<span class="k">def</span> <span class="nf">foo</span><span class="p">;</span> <span class="vi">@foo</span><span class="p">;</span> <span class="k">end</span>
<span class="nb">attr_writer</span> <span class="ss">:foo</span>
<span class="k">def</span> <span class="nf">foo</span><span class="o">=</span><span class="p">(</span><span class="n">i</span><span class="p">);</span> <span class="vi">@foo</span> <span class="o">=</span> <span class="n">i</span><span class="p">;</span> <span class="k">end</span>
<span class="nb">attr_accessor</span> <span class="ss">:foo</span>
<span class="o">^^^</span> <span class="no">Combines</span> <span class="n">the</span> <span class="n">above</span> <span class="n">two</span> <span class="nb">methods</span> <span class="n">into</span> <span class="n">one</span><span class="o">.</span>
</code></pre>
<p>But we have no way to designate methods that end via '?'.</p>
<p>I do not know which API call would be nice. apeiros on<br>
IRC suggested <code>attr_query</code></p>
<p>I am fine with that. (The name is secondary for me, I<br>
would like to have this feature available - what name<br>
it would then have is not the main issue for me.)</p>
<p>apeiros then also suggested this syntax:</p>
<p>All <code>attr_</code>* that would end with a <code>?</code> token, would be a<br>
combination of <code>attr_reader</code> and also a variant of the<br>
above that has a '?' token, so for example:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="nb">attr_reader</span> <span class="ss">:foo?</span>
</code></pre>
<p>Would create both a method <code>foo()</code> and <code>foo?()</code>.</p>
<p>People who do not need this, can continue to use:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="nb">attr_reader</span> <span class="ss">:foo</span>
</code></pre>
<p>just fine.</p>
<p>So perhaps this suggestion is even better than<br>
a new method (such as through <code>attr_query()</code>)</p>
<p>(I also have added one more line from apeiros,<br>
not sure if I understood it, but I think the<br>
above explanation should suffice - here is the<br>
other suggestion he did:)</p>
<pre><code>apeiros> e.g. attr_reader :foo? -> foo? // attr_accessor :foo? -> foo= + foo? // all with @foo of course. and foo? returning true/false.
</code></pre>
<p>Ok, that's it.</p>
<p>Thanks for reading!</p> Ruby master - Feature #11032 (Closed): Add a warning for misspelling "def intialize"https://redmine.ruby-lang.org/issues/110322015-04-03T18:38:45Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi guys,</p>
<p>When I was younger, in a class, I wrote this:</p>
<p>"def intialize(some_argument_here)"</p>
<p>This lead to an error because it should have been:</p>
<p>"def initialize(some_argument_here)"</p>
<p>My proposal is simple:</p>
<p>Add a warning for an error like this. :)</p>
<p>(a) If there is no method called "initialize"<br>
(b) but there is a message called "intialize",<br>
in a given class, add a notification such as:</p>
<p>"warning: intialize might be misspelled, perhaps you meant initialize"</p>
<p>Reasoning: Perhaps other people out there also sometimes misspell<br>
initialize, so that might make it a bit faster for them to<br>
detect this error.</p> Ruby master - Feature #10720 (Rejected): A proposal for something like: attr_reader :foo? - wi...https://redmine.ruby-lang.org/issues/107202015-01-09T02:23:18Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi guys,</p>
<p>Sorry to burden you with another suggestion, no problem<br>
if it is not accepted, I wanted to just make it. :-)</p>
<p>We have a way to define reader methods easily, such<br>
as in:</p>
<pre><code>attr_reader :foo
</code></pre>
<p>This should be equivalent to:</p>
<pre><code>def foo
@foo
end
</code></pre>
<p>I love query methods ending with ?, so I often also use<br>
something like:</p>
<pre><code>def foo?
@foo
end
</code></pre>
<p>What if there is a programmatic way to define these?</p>
<p>For instance, like:</p>
<pre><code>attr_reader? :foo
</code></pre>
<p>This might lead to confusion perhaps, so a way such as:</p>
<pre><code>attr_question :foo
</code></pre>
<p>or</p>
<pre><code>attr_query :foo
</code></pre>
<p>or perhaps even better</p>
<pre><code>attr_reader :foo?
</code></pre>
<p>The latter variant does not work:</p>
<pre><code>foo.rb:20:in `attr_reader': invalid attribute name `foo?' (NameError)
</code></pre>
<p>Perhaps :foo? could query the instance variable @foo<br>
instead here? Currently attr_reader :foo? is invalid<br>
but :foo? is a valid Symbol in itself.</p>
<p>At any rate, thanks for reading, may the year 2015 be<br>
great for all ruby devs and ruby users!</p> Ruby master - Feature #10663 (Open): Consider adding support for String input to File. methodshttps://redmine.ruby-lang.org/issues/106632014-12-27T17:07:22Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi,</p>
<p>Consider a file called 'test.rb'</p>
<p>We can change its permission with File.chmod like so:</p>
<p>File.chmod 444,'test.rb'</p>
<p>This should make it readable (world, group, owner)</p>
<p>and I believe it would be synonymous to</p>
<p>chmod +r test.rb</p>
<p>on the commandline.</p>
<p>In Ruby, this here does not work:</p>
<p>File.chmod '+r','test.rb'<br>
TypeError: no implicit conversion of String into Integer</p>
<p>Is there a reason why it must be an Integer? If Strings would<br>
be allowed then we could also use those abbreviations like<br>
'+r' just as we can with the commandline utility chmod.</p> Ruby master - Feature #10645 (Open): Consider adding support of .first to MatchData object like M...https://redmine.ruby-lang.org/issues/106452014-12-25T04:13:13Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi,</p>
<p>Lately I was using match data</p>
<p>test_string = "</p><a name="This-is-heading-6"></a>
<h6 >This is heading 6<a href="#This-is-heading-6" class="wiki-anchor">¶</a></h6>"
<p>match = /<h\d+>(.+)</h\d+>/.match(test_string)</p>
<p>Then I tried to do this:</p>
<p>puts match.first</p>
<p>It did not work.</p>
<p>puts match[0]</p>
<p>Is the way to go.</p>
<p>My question is:</p>
<p>Would it be consistent to consider adding<br>
support of .first to MatchData as well?</p>
<p>class Array has it - I kind of assumed that<br>
MatchData is a bit similar to Array.</p>
<p>Thanks,</p> Ruby master - Bug #10612 (Closed): Documentation: Document behaviour of Hash#inverthttps://redmine.ruby-lang.org/issues/106122014-12-17T17:49:25Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Currently a hash loses data if an .invert is done:</p>
<pre><code>{"hey"=>3, "there"=>3, "yippie"=>3, "ack"=>2, "ackack"=>9, "thore"=>3, "yippa"=>9}.invert
</code></pre>
<p>Result:</p>
<pre><code># {3=>"thore", 2=>"ack", 9=>"yippa"}
</code></pre>
<p>In the example, this is shown, but it is not documented at:</p>
<p><a href="http://www.ruby-doc.org/core-2.1.5/Hash.html#method-i-invert" class="external">http://www.ruby-doc.org/core-2.1.5/Hash.html#method-i-invert</a></p>
<p>As the example already shows it, my suggestion is to extend the documentation<br>
with a sentence such as this:</p>
<p>"If a key with the same name already exists in the Hash then the<br>
last one defined will be used, the earlier key will be discarded."</p>
<p>Or something similar to this.</p> Ruby master - Bug #10492 (Closed): Please improve documentation for Process.killhttps://redmine.ruby-lang.org/issues/104922014-11-09T20:42:29Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi,</p>
<p>The current docu can be seen at:</p>
<p><a href="http://www.ruby-doc.org/core-2.1.4/Process.html#method-c-kill" class="external">http://www.ruby-doc.org/core-2.1.4/Process.html#method-c-kill</a></p>
<p>I would like to see all values that can be passed to</p>
<p>Process.kill</p>
<p>documented there.</p>
<p>Can someone add this please?</p>
<p>I would try to write a patch myself but I do not know which<br>
PIDs are valid and which ones are not, and where else<br>
to find this information. (I tried to look up because<br>
I needed to kill PIDs from a trojan respawning stuff<br>
all over everywhere, and I got tired scanning for<br>
them with shell scripts so I started to write a ruby<br>
script - stuff like /usr/bin/.sshd being a binary<br>
program that tries to keep on respawning itself.<br>
Process.kill :QUIT did not seem to do anything<br>
there)</p> Ruby master - Misc #10312 (Open): Give people more control over how the ruby parser sees code and...https://redmine.ruby-lang.org/issues/103122014-10-01T18:28:08Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi,</p>
<p>I am aware that this proposal has most likely not a chance for<br>
implementation, but I'd still like to make it - this is why I<br>
put it here into misc rather than bugs or features. It's misc -<br>
like ideas!</p>
<p>So first allow me to introduce how I came up with this idea at<br>
all.</p>
<p>I have built a "web framework", which is pretty ugly, but<br>
useful to me. It is actually less of a web framework and<br>
more of a way to describe a "web app" - right now using<br>
valid ruby syntax, but hopefully one day I can transition<br>
into something that is even terser than what it is right<br>
now, and eventually becomes valid ruby (or css or javascript<br>
etc... a bit like HaXe <a href="http://haxe.org/" class="external">http://haxe.org/</a> but with a more<br>
elegant syntax resembling ruby rather than java)</p>
<p>I describe a web-page currently such as that way:</p>
<p>w {<br>
title 'My little page'<br>
css_style '<br>
body {<br>
padding: 0.20em;<br>
}'<br>
favicon 'foo/bar.png'<br>
font_size '20px'<br>
use_jquery<br>
}</p>
<p>Ok, w is simply a method call w() returning an instance of class<br>
WebObject, and we pass it a block. The block I use for a DSL-like<br>
approach to describe the page in question. For instance, use_jquery<br>
simply is in fact w.use_jquery - so it is a method call on that<br>
web object.</p>
<p>Before that, I was using this line here:</p>
<p>jquery :+</p>
<p>The + reminds me of "yes, enable jquery".</p>
<p>Obviously, to disable jquery, I would do:</p>
<p>jquery :-</p>
<p>Then I thought - "Hey, it would be cool if I could do this:</p>
<p>jquery +</p>
<p>instead. In other words, get rid of the : symbol identifier.</p>
<p>But here the ruby parser rightfully chokes because it does not<br>
understand what is meant with jquery +. Fair enough, this is<br>
not valid ruby.</p>
<p>But to my human eyes, jquery + reads nicer than jquery :+</p>
<p>I could get away doing this instead and treat it as a String:</p>
<p>'jquery +'</p>
<p>And simply parse that with ruby. But I already use:</p>
<p>use_jquery</p>
<p>above, so that is nicer IMO than using the two ' characters.</p>
<p>So now, sorry for that long introduction but perhaps you can<br>
understand my line of thought here.</p>
<p>So I was thinking it would be nice if people could get more<br>
control over the Ruby Parser itself.</p>
<p>For instance, in the above example and only for that file/class,<br>
I would like to tell the ruby parser "hey dude, don't mind if<br>
that specific block has invalid syntax, I'd parse on my own.</p>
<p>Possibly it would be enough if those invalid syntax elements<br>
could become strings - then I can parse those strings on my<br>
own.</p>
<p>Of course the net gain between:</p>
<p>jquery :+</p>
<p>and</p>
<p>jquery +</p>
<p>is minimal, but I love ruby's terse syntax.</p>
<p>Anyway, I am aware that this has no real chance for the ruby<br>
2.x era but perhaps considering all the ideas in regards to<br>
optional static type information and what-not for 3.x ruby era,<br>
more control over the ruby parser itself would be nice<br>
(lisp-like macros!).</p>
<p>Regards.</p> Ruby master - Bug #10239 (Closed): Regexp.quote() and default encodinghttps://redmine.ruby-lang.org/issues/102392014-09-14T09:54:55Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello,</p>
<p>I am not sure if this is a bug, or unexpected behaviour (for me).</p>
<p>I will simply report it, I am sure you guys know how and if to<br>
handle this anyway.</p>
<p>I believe it should be documented at least in the official documentation<br>
if it is not a bug.</p>
<p>The situation is that I have several strings with mixed encodings.</p>
<p>Some will have automatically UTF8, some US-ASCII, and yet some<br>
others will have ASCII-8BIT.</p>
<p>I noticed that Regexp.quote() change the encoding of the string<br>
in question in the same project unfortunately, and no way to<br>
change that (as some of that gets set from the outside world<br>
to me).</p>
<p>Here is proof for Regexp.quote() changing the encoding, where<br>
x is my test variable - a string:</p>
<p>x = "abc"; x.encoding # => #<a href="Encoding:US-ASCII" class="external">Encoding:US-ASCII</a></p>
<p>x.encode!('ASCII-8BIT'); x.encoding # => #<a href="Encoding:ASCII-8BIT" class="external">Encoding:ASCII-8BIT</a></p>
<p>Ok, all works fine, it defaulted to US-ASCII but is not<br>
ASCII-8BIT.</p>
<p>Next:</p>
<p>test = Regexp.quote(x); test.encoding # => #<a href="Encoding:US-ASCII" class="external">Encoding:US-ASCII</a></p>
<p>Suddenly the new string that is returned has another encoding.</p>
<p>I looked at the documentation:</p>
<p><a href="http://www.ruby-doc.org/core-2.1.2/Regexp.html#method-c-quote" class="external">http://www.ruby-doc.org/core-2.1.2/Regexp.html#method-c-quote</a></p>
<p>But there is no mention that this method would return a new<br>
String object with a different encoding.</p>
<p>I would have expected it to not change the encoding of the<br>
argument-string object there.</p>
<p>Perhaps the documentation could mention that it will ignore<br>
the original encoding of the string given?</p> Ruby master - Feature #10237 (Open): Transform all elements of one Encoding into another Encoding...https://redmine.ruby-lang.org/issues/102372014-09-13T22:59:19Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>I find myself to sometimes have to convert one encoding to the other.</p>
<p>For string objects, this is trivial:</p>
<p>.encode()<br>
.force_encoding()</p>
<p>For reading in a file via File.readlines(), this is also<br>
simple because of stuff like:</p>
<p>File.readlines('test.txt', :encoding => 'ascii-8bit')</p>
<p>For Array and Hashes, however, this is a bit annoying for me.</p>
<p>I'd love to have an .encode method as well.</p>
<p>This method should try to convert all elements on an Array<br>
or a Hash to another encoding IF they are a string object.</p>
<p>I'd like to be able to treat Array and Hashes in the same<br>
way, so that I can e. g. convert a hash dictionary from<br>
one encoding to the other quickly.</p>
<p>It already is possible of course, with some extra lines<br>
of code, but I'd love to have a way to do so with just<br>
one method call.</p>
<p>:</p> Ruby master - Bug #10166 (Closed): Problem with openssl and ext/openssl - ruby 2.1.2p95 (2014-05-...https://redmine.ruby-lang.org/issues/101662014-08-23T21:05:05Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi guys,</p>
<p>Not sure if it is worth reporting but I guess it is better to<br>
report twice than zero times, in the event someone else<br>
already reported it.</p>
<p>I have compiled ruby from source lately.</p>
<p>The version is:</p>
<p>ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]</p>
<p>I downloaded it from this URL:</p>
<p>wget <a href="ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2" class="external">ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.bz2</a></p>
<p>Now, I am using a debian-base system and I decided to compile<br>
most stuff anew, including readline, ncurses etc...</p>
<p>Readline bindings of Ruby work well, but I have problems<br>
with openssl.</p>
<p>I just finished compiling openssl from source:</p>
<p>wget <a href="ftp://ftp.openssl.org/source/openssl-1.0.1i.tar.gz" class="external">ftp://ftp.openssl.org/source/openssl-1.0.1i.tar.gz</a></p>
<p>I followed the LFS guide here:</p>
<p><a href="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html" class="external">http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl.html</a></p>
<p>This works, and now I have openssl 1.0.1i installed.</p>
<p>But ruby does not seem to like it.</p>
<p>When I go into ext/openssl, I run this command:</p>
<p>ruby extconf.rb</p>
<p>Now, many checks happen, and a Makefile is created in the end:</p>
<p>checking for t_open() in -lnsl... no<br>
checking for socket() in -lsocket... no<br>
checking for assert.h... yes<br>
checking for openssl/ssl.h... yes<br>
checking for openssl/conf_api.h... yes<br>
checking for SSL_library_init() in openssl/ssl.h with -Werror=deprecated-declarations... yes<br>
checking for openssl/ssl.h... yes<br>
checking for ERR_peek_last_error()... yes<br>
checking for ASN1_put_eoc()... yes<br>
checking for BN_mod_add()... yes<br>
checking for BN_mod_sqr()... yes<br>
checking for BN_mod_sub()... yes<br>
checking for BN_pseudo_rand_range()... yes<br>
checking for BN_rand_range()... yes<br>
checking for CONF_get1_default_config_file()... yes<br>
checking for EVP_CIPHER_CTX_copy()... yes<br>
checking for EVP_CIPHER_CTX_set_padding()... yes<br>
checking for EVP_CipherFinal_ex()... yes<br>
checking for EVP_CipherInit_ex()... yes<br>
checking for EVP_DigestFinal_ex()... yes<br>
checking for EVP_DigestInit_ex()... yes<br>
checking for EVP_MD_CTX_cleanup()... yes<br>
checking for EVP_MD_CTX_create()... yes<br>
checking for EVP_MD_CTX_destroy()... yes<br>
checking for EVP_MD_CTX_init()... yes<br>
checking for HMAC_CTX_cleanup()... yes<br>
checking for HMAC_CTX_copy()... yes<br>
checking for HMAC_CTX_init()... yes<br>
checking for PEM_def_callback()... yes<br>
checking for PKCS5_PBKDF2_HMAC()... yes<br>
checking for PKCS5_PBKDF2_HMAC_SHA1()... yes<br>
checking for X509V3_set_nconf()... yes<br>
checking for X509V3_EXT_nconf_nid()... yes<br>
checking for X509_CRL_add0_revoked()... yes<br>
checking for X509_CRL_set_issuer_name()... yes<br>
checking for X509_CRL_set_version()... yes<br>
checking for X509_CRL_sort()... yes<br>
checking for X509_NAME_hash_old()... yes<br>
checking for X509_STORE_get_ex_data()... no<br>
checking for X509_STORE_set_ex_data()... no<br>
checking for OBJ_NAME_do_all_sorted()... yes<br>
checking for SSL_SESSION_get_id()... yes<br>
checking for SSL_SESSION_cmp()... no<br>
checking for OPENSSL_cleanse()... yes<br>
checking for SSLv2_method()... yes<br>
checking for SSLv2_server_method()... yes<br>
checking for SSLv2_client_method()... yes<br>
checking for TLSv1_1_method()... yes<br>
checking for TLSv1_1_server_method()... yes<br>
checking for TLSv1_1_client_method()... yes<br>
checking for TLSv1_2_method()... yes<br>
checking for TLSv1_2_server_method()... yes<br>
checking for TLSv1_2_client_method()... yes<br>
checking for OPENSSL_NPN_NEGOTIATED in openssl/ssl.h... yes<br>
checking for SSL_set_tlsext_host_name() in openssl/ssl.h... no<br>
checking for SSL_set_tlsext_host_name in openssl/ssl.h... yes<br>
checking for openssl/engine.h... yes<br>
checking for ENGINE_add()... yes<br>
checking for ENGINE_load_builtin_engines()... yes<br>
checking for ENGINE_load_openbsd_dev_crypto()... no<br>
checking for ENGINE_get_digest()... yes<br>
checking for ENGINE_get_cipher()... yes<br>
checking for ENGINE_cleanup()... yes<br>
checking for ENGINE_load_dynamic()... yes<br>
checking for ENGINE_load_4758cca()... no<br>
checking for ENGINE_load_aep()... no<br>
checking for ENGINE_load_atalla()... no<br>
checking for ENGINE_load_chil()... no<br>
checking for ENGINE_load_cswift()... no<br>
checking for ENGINE_load_nuron()... no<br>
checking for ENGINE_load_sureware()... no<br>
checking for ENGINE_load_ubsec()... no<br>
checking for ENGINE_load_padlock()... no<br>
checking for ENGINE_load_capi()... no<br>
checking for ENGINE_load_gmp()... no<br>
checking for ENGINE_load_gost()... no<br>
checking for ENGINE_load_cryptodev()... yes<br>
checking for ENGINE_load_aesni()... no<br>
checking for DH_generate_parameters_ex()... yes<br>
checking for DSA_generate_parameters_ex()... yes<br>
checking for RSA_generate_key_ex()... yes<br>
checking for OpenSSL version is 0.9.7 or later... yes<br>
checking for openssl/ocsp.h... yes<br>
checking for CRYPTO_THREADID.ptr in openssl/crypto.h... yes<br>
checking for EVP_CIPHER_CTX.flags in openssl/evp.h... yes<br>
checking for EVP_CIPHER_CTX.engine in openssl/evp.h... yes<br>
checking for X509_ATTRIBUTE.single in openssl/x509.h... yes<br>
checking for OPENSSL_FIPS in openssl/opensslconf.h... no<br>
checking for EVP_CTRL_GCM_GET_TAG in openssl/evp.h... yes<br>
creating extconf.h<br>
creating Makefile</p>
<p>Next, I run make command:</p>
<p>make</p>
<p>compiling ossl_ssl_session.c<br>
compiling ossl_x509store.c<br>
compiling ossl_digest.c<br>
compiling ossl_pkey_dsa.c<br>
compiling ossl_hmac.c<br>
compiling ossl_cipher.c<br>
compiling ossl_x509req.c<br>
compiling ossl_rand.c<br>
compiling ossl_pkcs12.c<br>
compiling openssl_missing.c<br>
compiling ossl_x509attr.c<br>
compiling ossl_x509ext.c<br>
compiling ossl_pkey_ec.c<br>
compiling ossl_bn.c<br>
compiling ossl_x509name.c<br>
compiling ossl_config.c<br>
compiling ossl_x509cert.c<br>
compiling ossl_x509revoked.c<br>
compiling ossl_ssl.c<br>
compiling ossl_pkcs5.c<br>
compiling ossl_x509crl.c<br>
compiling ossl_pkey_rsa.c<br>
compiling ossl_x509.c<br>
compiling ossl_engine.c<br>
compiling ossl_pkey.c<br>
make: *** No rule to make target '/thread_native.h', needed by 'ossl.o'. Stop.</p>
<p>And here I do not know what to do. I do not know what is the header file<br>
thread_native.h but it is in the same directory:</p>
<p>/Depot/Temp/ruby-2.1.2/thread_native.h</p>
<p>I did a cat, and here is what it is:</p>
<p>#ifndef RUBY_THREAD_NATIVE_H<br>
#define RUBY_THREAD_NATIVE_H</p>
<p>#if defined(_WIN32)<br>
#include "thread_win32.h"<br>
#elif defined(HAVE_PTHREAD_H)<br>
#include "thread_pthread.h"<br>
#else<br>
#error "unsupported thread type"<br>
#endif</p>
<p>RUBY_SYMBOL_EXPORT_BEGIN</p>
<p>rb_nativethread_id_t rb_nativethread_self();</p>
<p>void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock);<br>
void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock);<br>
void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock);<br>
void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock);</p>
<p>RUBY_SYMBOL_EXPORT_END</p>
<p>#endif</p>
<p>I am not sure how to proceed here.</p>
<p>Is it possible to add a better error-description here so that<br>
the user understands what is wrong? I believe something may<br>
be wrong with threads on my system, but only in regards<br>
to openssl perhaps?</p>
<p>If you can help me fix this error it would be very appreciated<br>
too, as rubygems requires openssl (unfortunately).</p>
<p>Last but not least, here is my system output:</p>
<h1>========================================================================<br>
Operating System: GNU/Linux<br>
OS Bit Type: x86_64<br>
Kernel Version: 3.13.0<br>
GCC Version: 4.8.2<br>
Glibc Version: (Ubuntu EGLIBC 2.19-0ubuntu6) 2.19<br>
CFLAGS in use: -O2 -fPIC -fno-strict-overflow<br>
RAM: 7876284 kB RAM (7691.7 MB) (7.5 Gig)<br>
Binutils Version: 2.24<br>
Make Version in use: 4.0<br>
Cmake Version in use: 2.8.12.1<br>
CPU Model: Intel(R) Celeron(R) CPU G1630 @ 2.80GHz<br>
Screen Resolution: 1920x1080<br>
Openssl Version: 1.0.1i<br>
Tar Version: 1.27.1<br>
Ruby Version: 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]<br>
Rubygems Version: 2.4.1<br>
Rubygems Installation Directory: /usr/lib/ruby/gems/2.1.0<br>
GTK Version 2: 2.24.22<br>
GTK Version 3: 3.13.7<br>
Glib Version: 2.41.3<br>
ATK Version: 2.13.3<br>
Pango Version: 1.36.6<br>
Cairo Version: 1.12.16<br>
Bison Version: 3.0.2<br>
Intltool Version: 0.50.2<br>
Nasm version: 2.11.05<br>
M4 version: 1.4.17<br>
Flex Version: 2.5.39<br>
Readline Version: 6.3<br>
File version: 5.14<br>
KDE Version: 4.13.0<br>
Grep Version: 2.16<br>
Coreutils Version: 8.21<br>
Fontconfig Version: 2.11.1<br>
Perl Version: 5.20.0<br>
Python Version: 2.7.8</h1> Ruby master - Feature #10121 (Closed): Dir.empty?https://redmine.ruby-lang.org/issues/101212014-08-10T13:38:19Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>On IRC someone asked how to find out if a directory is empty or not, from within ruby.</p>
<p>It seems as if there was no simple way.</p>
<p>I suggest adding <code>Dir.empty?</code></p>
<p>On IRC, someone else suggested this:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">Dir</span><span class="p">.</span><span class="nf">entries</span><span class="p">(</span><span class="n">dir</span><span class="p">).</span><span class="nf">size</span> <span class="o">==</span> <span class="mi">2</span>
</code></pre>
<p>I do not know if there are better ways but possibly that could<br>
be used for a <code>Dir.empty?</code> functionality?</p> Ruby master - Feature #10047 (Feedback): Proposal for failesafe requireshttps://redmine.ruby-lang.org/issues/100472014-07-16T15:17:12Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi guys,</p>
<p>I know this is unlikely to make it in, so it can be closed soon I suppose,<br>
but a short discussion might be useful still?</p>
<p>I am doing something like this here quite often:</p>
<p>begin<br>
require 'foo_bar'<br>
rescue LoadError; end</p>
<p>One project I use has about 100 of these requires. These projects<br>
are mostly tiny, often consisting of just one file, and it also<br>
is often not important if these are available or not, hence why<br>
there is a silent rescue, so that loading of the main project<br>
can continue unhampered.</p>
<p>But I wondered why I couldn't just use a special call of<br>
require instead.</p>
<p>We have require_relative, so why not something like this:</p>
<p>require_failsafe 'foo_bar'</p>
<p>?</p>
<p>You could even report a string to the user like:</p>
<p>require_failsafe 'foo_bar','please install foo_bar'</p>
<p>yet continue loading.</p> Ruby master - Feature #10018 (Feedback): Consider adding Sub-Includes as in include Foo::barhttps://redmine.ruby-lang.org/issues/100182014-07-09T11:48:37Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>On IRC someone asked a nice question:</p>
<blockquote>
<p><arup_r> If I write <code>class Foo; include Enumerable; end</code> This code include all methods from <code>Enumerable</code>. But suppose I want to include <code>#all?</code>, <code>#any?</code> .. What's the way to include only required methods ?</p>
</blockquote>
<p>This prompted me to write this.</p>
<p>What if ruby would allow us to include just singular methods?</p>
<p>Something like:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="kp">include</span> <span class="no">Enumerable</span><span class="o">::</span><span class="n">any?</span>
</code></pre>
<p>And so forth, so that we could cherry-pick what we want.</p>
<p>This is already possible in some projects, like facets.</p>
<p>But I think they solve it by splitting up the whole<br>
stuff into individual files, and then including<br>
this.</p>
<p>I think it would be nicer if include itself would<br>
support a scope-mechanic.</p> Ruby master - Feature #9969 (Closed): Add File.empty? as alias to File.zero?https://redmine.ruby-lang.org/issues/99692014-06-21T13:08:33Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Could we alias File.empty? to File.zero? ?</p>
<p>The latter already exists. I tried to use File.empty?<br>
and then thought it would not exist, but the code<br>
already exists, it is just called File.zero? instead.</p> Ruby master - Feature #9887 (Open): Add uninclude pleasehttps://redmine.ruby-lang.org/issues/98872014-05-31T02:06:14Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi!</p>
<p>I would like to have a way to cleanly uninclude a module.</p>
<p>Consider:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">module</span> <span class="nn">Foo</span>
<span class="no">TEST</span> <span class="o">=</span> <span class="s1">'123'</span>
<span class="k">end</span>
<span class="k">class</span> <span class="nc">Bar</span>
<span class="kp">include</span> <span class="no">Foo</span>
<span class="k">end</span>
</code></pre>
<p>Now I would like to uninclude Foo. I can remove constants and methods already,<br>
i.e. via <code>remove_method</code> or <code>undef</code>* and constants can be removed as well but<br>
I would like to have something like:</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="k">class</span> <span class="nc">Bar</span>
<span class="n">uninclude</span> <span class="no">Foo</span>
<span class="k">end</span>
</code></pre>
<p>or</p>
<pre><code class="ruby syntaxhl" data-language="ruby"><span class="no">Bar</span><span class="p">.</span><span class="nf">uninclude</span> <span class="no">Foo</span>
<span class="no">Bar</span><span class="p">.</span><span class="nf">remove_ancestors</span> <span class="no">Foo</span>
</code></pre>
<p>Would this be possible? It might be useful but perhaps there is a<br>
reason why this can not be added.</p> Ruby master - Feature #9864 (Closed): Rename 'optparse' to 'optionparser', or the main class Opti...https://redmine.ruby-lang.org/issues/98642014-05-25T16:11:21Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello.</p>
<p>I don't like the inconsistency in the naming of optparse and the class that<br>
we are supposed to use itself.</p>
<p>I think it would be better to do:</p>
<p>require 'optparse'<br>
OptParse.new</p>
<p>or</p>
<p>require 'optionparser'<br>
OptionParser.new</p> Ruby master - Feature #9853 (Open): Please consider quoted generation of hash like in %h( foo bar...https://redmine.ruby-lang.org/issues/98532014-05-19T16:43:49Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi.</p>
<p>In Ruby we can do this:</p>
<p>%w( foo bar bee blaa ) # => ["foo", "bar", "bee", "blaa"]</p>
<p>Ok makes an array of strings.</p>
<p>We can do this:</p>
<p>%i( foo bar bee blaa ) # => [:foo, :bar, :bee, :blaa]</p>
<p>Ok, makes an array of symbols.</p>
<p>We can also use [] on class Hash to generate a hash:</p>
<p>Hash[*%w( foo bar bee blaa )] # => {"foo"=>"bar", "bee"=>"blaa"}</p>
<p>My question:</p>
<p>Would it be possible to add %h() ? It would create a hash:</p>
<p>%h( foo bar bee blaa ) # => {"foo"=>"bar", "bee"=>"blaa"}</p>
<p>And would raise if odd number of arguments would be supplied.</p> Ruby master - Misc #9724 (Open): Warnings in Ruby: allow per-file directives to i.e. suppress war...https://redmine.ruby-lang.org/issues/97242014-04-10T18:21:31Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi,</p>
<p>A bit of intro.</p>
<p>I usually run all my ruby code with -w. I feel that it gives me some more security if the<br>
ruby parser does not have to think about ambiguous code.</p>
<p>Now this works perfect for my own code - I know what I have written, I know how to fix it,<br>
so my code runs fine.</p>
<p>Problem is other people who do not use the -w switch, and in doing so their stuff outputs<br>
a lot of warnings if I require their project and use them.</p>
<p>This is somewhat annoying and there is no real good way to fix it as far as I know.</p>
<p>Modifying $VERBOSE and setting it to nil is of no real help because it works globally.<br>
But I'd rather want something to be used on a per-file basis.</p>
<p>Would it be possible to enable something that could be used on a per file<br>
basis? Kernel.no_warnings, or Kernel.be_silent or something like this?</p> Ruby master - Feature #9319 (Closed): Add constant RUBY_KEYWORDS or a similar way to output which...https://redmine.ruby-lang.org/issues/93192013-12-30T05:10:42Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi,</p>
<p>Would it be possible to list all keywords in Ruby, from within a running program?</p>
<p>Like RUBY_KEYWORDS or similar?</p>
<p>Reasoning: On IRB someone asked me if "in" is a keyword. I was not sure so I googled<br>
because I could not remember right off the head (I later remembered that "in" must<br>
be because it is used in a "for" loop).</p>
<p>It would be nice if we could ask ruby itself which keywords would be available,<br>
i.e. stored in an array.</p>
<p><a href="http://ruby-doc.org/docs/keywords/1.9/" class="external">http://ruby-doc.org/docs/keywords/1.9/</a> has a nice description of all keywords<br>
too, which is great.</p> Ruby master - Feature #9185 (Open): Add alias_class_method or class_alias functionalityhttps://redmine.ruby-lang.org/issues/91852013-12-01T03:39:32Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi core team,</p>
<p>First drink a Calpis (カルピス Karupisu) before reading on :-)</p>
<p>Now, my proposal is to add a slight new feature that is mostly one of convenience.</p>
<p>We have two ways to use aliases:</p>
<p>(1) alias<br>
(2) alias_method</p>
<p>But are similar but not 100% the same.</p>
<p>Now this works all fine and nice.</p>
<p>But how to define a class method? Well, simple:</p>
<p>class Foo; def self.hi; puts 'hi'; end; end; Foo.hi</p>
<p>But how can we make an alias to this class method?</p>
<p>Well, this is ugly - here is one way:</p>
<p>class Foo; class << self; def ho; hi; end;end;end</p>
<p>Is this readable to you?</p>
<p>Using alias would be more readable.</p>
<p>Ok, we can simplify it by using alias:</p>
<p>class Foo; class << self; alias ho hi; end;end</p>
<p>But I don't like the class << self there, just to make<br>
a single class alias.</p>
<p>I thus propose a new method called:</p>
<p>class_alias</p>
<p>The above could then be rewritte like so perhaps:<br>
class Foo; class_alias :ho, :hi; end # I guess this would be more akin to alias_method</p>
<p>If the name is bad, it could be:</p>
<p>alias_class_method</p>
<p>Perhaps. Anyway, the name is not so important, I am sure a good name can be found,<br>
but I wonder if this would be a good feature to add or not.</p>
<p>Thanks for reading!</p> Ruby master - Bug #9041 (Rejected): Please add alias "starts_with?" to class Stringhttps://redmine.ruby-lang.org/issues/90412013-10-21T23:15:15Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi.</p>
<p>We can do these:</p>
<p>FileUtils.touch 'test' # => ["test"]<br>
File.exist? 'test' # => true<br>
File.exists? 'test' # => true<br>
'test'.start_with? 't' # => true</p>
<p>However, we can not use .starts_with?</p>
<p>'test'.starts_with? 't' NoMethodError: undefined method `starts_with?' for "test":String</p>
<p>I propose that, for proper english, and consistency with the duality of File.exist? and File.exists?<br>
to also add alias starts_with? so that we can use proper english.</p>
<p>The proper english way to query such a question would be:</p>
<p>"Does the word abc start with an a?"<br>
and in short form as factual, affirmative statement:<br>
"abc starts with a."<br>
whereas this here would be not proper english:<br>
"abc start with a."</p> Ruby master - Bug #7899 (Closed): Add feature similar to: perl use warningshttps://redmine.ruby-lang.org/issues/78992013-02-21T20:23:37Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p> shevy: It would be nice ruby had a way to enable warnings within the code - like perl's <code>use warnings;</code></p>
<p>Hi,</p>
<p>Background to this is that maasha had problems with shebang, /usr/bin/env and "ruby -w" as part of the shebangs.</p>
<p>He was able to workaround this by setting RUBYOPT:</p>
<p> shevy: I think the conclusion is that one needs to set: export RUBYOPT=-w</p>
<p>A bit background is here:</p>
<p><a href="http://stackoverflow.com/questions/4303128/how-to-use-multiple-arguments-with-a-shebang-i-e" class="external">http://stackoverflow.com/questions/4303128/how-to-use-multiple-arguments-with-a-shebang-i-e</a></p>
<p>Now one suggestion is to set $VERBOSE to 2 or true. But I am not sure whether this is the<br>
best or most elegant solution.</p>
<p>Could there be a way to enable and disable warnings globally within a .rb script?</p>
<p>Kernel.enable_warnings<br>
Kernel.disable_warnings</p>
<p>Something like that?</p>
<p>Then users could specifically choose to ignore certain warnings, if they want to (like during development when they dont care about all warnings in every .rb file of a project).</p> Ruby master - Feature #7848 (Open): Restore default state for core ruby objectshttps://redmine.ruby-lang.org/issues/78482013-02-14T04:41:33Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi.</p>
<p>Consider:</p>
<p>class String<br>
def lala<br>
puts 'Running lala() from class String.'<br>
end<br>
end</p>
<p>This is possible.</p>
<p>My question is - is there a reason why we can not restore<br>
to the default ruby state again?</p>
<p>For instance, if I would do:</p>
<p>String.restore</p>
<p>I could undo all modifications to String, save what was used<br>
in String class on startup/initialize.</p>
<p>The reason I would like to have something like this is so<br>
that I could safely undo all "monkey" patches again, if needed,<br>
for a given project.</p> Ruby master - Bug #7827 (Rejected): Allow users to yield a block in string formathttps://redmine.ruby-lang.org/issues/78272013-02-12T02:47:55Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi.</p>
<p>Not long ago I realized that you can use "invalid" syntax inside a ruby block.</p>
<p>For instance:</p>
<p>def foo; end</p>
<p>foo() { ABC } # ABC is not known.</p>
<p>This works, until you yield that.</p>
<p>And if you yield it, that would fail, unless the ABC constant would be known.<br>
(Or perhaps a global variable instead, so let's consider:</p>
<p>foo() { $abc }</p>
<p>So far so good.</p>
<p>Now I actually had the idea that a ruby user might want to<br>
return the content of a block in string format, modify that<br>
string, and then somehow eval it (or .call it)</p>
<p>Would that be useful? Or even possible?</p>
<p>It probably is not so useful, but it would be kind of<br>
fun to be able to put whole classes inside a block,<br>
which later could get known, or turned into an unbound<br>
object again... Ok, I have no idea if this is useful<br>
at all. :)</p>
<p>If it is just a crazy idea, just close it :D</p>
<p>So my suggestion would be:</p>
<p>def foo; end<br>
result = foo() { $abc }<br>
$abc = 5</p>
<a name="And-here-either-yield-externally-on-result"></a>
<h1 >And here, either yield externally on result,<a href="#And-here-either-yield-externally-on-result" class="wiki-anchor">¶</a></h1>
<a name="or-turn-it-into-a-proc-somehow-and-then"></a>
<h1 >or turn it into a proc somehow, and then<a href="#or-turn-it-into-a-proc-somehow-and-then" class="wiki-anchor">¶</a></h1>
<a name="before-evaluating-it-perhaps-add-a-new"></a>
<h1 >before evaluating it, perhaps add a new<a href="#before-evaluating-it-perhaps-add-a-new" class="wiki-anchor">¶</a></h1>
<a name="method-like"></a>
<h1 >method like:<a href="#method-like" class="wiki-anchor">¶</a></h1>
<p>result.proc.proc_string # This here would return '$abc'<br>
which could then manually be eval()ed at a later<br>
time.</p>
<p>I know, I have absolutely no use case for this, I<br>
just thought it would be cool to use invalid code<br>
inside {} and then perhaps lateron turn this into<br>
valid ruby code (or use it in some other way, such<br>
as <strong>END</strong> and DATA.read)</p>
<p>Thanks for reading at least!</p> Ruby master - Bug #6666 (Closed): Documentation Improve - rdoc does not know where rb_obj_methods...https://redmine.ruby-lang.org/issues/66662012-06-29T05:57:29Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi.</p>
<p>It seems there is no simple online documentation available what<br>
#methods is doing in Ruby:</p>
<p> can't find #methods anywhere in the docs<br>
really strange<br>
the docs are normally quite thorough</p>
<p>Upon looking at this, we saw the method defined first in<br>
object.c here:</p>
<p>object.c: rb_define_method(rb_mKernel, "methods", rb_obj_methods, -1);</p>
<p><a href="https://github.com/ruby/ruby/blob/trunk/object.c#L2897" class="external">https://github.com/ruby/ruby/blob/trunk/object.c#L2897</a></p>
<p>Referring to:</p>
<p>class.c: rb_obj_methods(int argc, VALUE *argv, VALUE obj)</p>
<p>class.c has the proper rdoc documentation for #methods there.<br>
But this does not seem to show up in the online docu.</p>
<p>On IRC, Mon_Ouie said that a reference is missing in order<br>
to make this work:</p>
<p> class.c has the rdoc docu though<br>
<Mon_Ouie> All that's missing is the /* in class.c <em>/ comment<br>
<Mon_Ouie> to make rdoc find the method<br>
<Mon_Ouie> Yeah, the method is documented, but RDoc doesn't know in what file it is defined, since it's not object.c<br>
<Mon_Ouie> So it needs a /</em> in class.c */ comment to know where to look for it</p>
<p>My request:</p>
<p>Could class.c include this comment so that the online documentation will point<br>
to the proper #methods documentation?</p> Backport187 - Backport #6624 (Closed): require_relative in 1.8https://redmine.ruby-lang.org/issues/66242012-06-22T09:00:11Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi!</p>
<p>I know there is little chance that this will be included, as this month is now last<br>
chance for any change in 1.8.x, as 1.8.x is dead, but still I suggest it. :)</p>
<p>Some things like lambda -> operator won't have an alternative for 1.8, so it<br>
is not even possible to make all changes for 1.8.x anyway in backward compatible<br>
way.</p>
<p>But one thing that could perhaps have a 1.8.x version is require_relative, and<br>
it is used a lot in 1.9.x</p>
<p>Folks could i.e. avoid the -> lambda, but still make use of require_relative,<br>
and their gems would work on 1.8.x too.</p>
<p>The absolute filepath could be found out perhaps via</p>
<p>Pathname(<strong>FILE</strong>).dirname.realpath</p>
<p>Hmm ok I know this has no chance to make it, no problem :)</p>
<p>I am on 1.9.3 finally myself!</p> Ruby master - Bug #6508 (Rejected): Add an (optional) GNU configure option to demand libyaml befo...https://redmine.ruby-lang.org/issues/65082012-05-28T18:49:08Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi. When I compile ruby 1.9.3 I get this sometimes:</p>
<p>It seems your ruby installation is missing psych (for YAML output).<br>
To eliminate this warning, please install libyaml and reinstall your ruby.</p>
<p>This is a bit annoying because I need yaml support, so I have to<br>
recompile anyway. So I first compile libyaml, then I recompile ruby.</p>
<p>I had a look at ./configure --help but there was no option provided<br>
to require libyaml before continuing.</p>
<p>My suggestion is to add this to the configure script, so that users<br>
like me can know that the ruby that was compiled 100% has libyaml<br>
support or 100% does not have libyaml support.</p>
<p>Option for configure:</p>
<p>--with-libyaml Require a working libyaml installation before continuing.</p>
<p>If libyaml is not installed at configure-time, the configure script<br>
stops with this message (suggestion):</p>
<p>"We were unable to find a working libyaml installation. As --with-libyaml<br>
was passed, we can not continue before you have installed libyaml. Please<br>
install libyaml, either from source such as from <a href="http://pyyaml.org/download/libyaml/" class="external">http://pyyaml.org/download/libyaml/</a><br>
or from your distribution's package manager."</p>
<p>Thanks for reading and considering! I like ruby but the change to<br>
yaml is a bit annoying when compiling ruby, for me it is much easier<br>
if the configure script does not continue, if it has such an option.</p> Ruby 1.8 - Bug #6505 (Rejected): Can not compile ruby-1.8.7p358 from sourcehttps://redmine.ruby-lang.org/issues/65052012-05-27T21:45:43Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>My system:</p>
<p>Linux</p>
<p>GCC Version: GCC version 4.6.3<br>
Glibc Version: ldd (GNU libc) 2.14.1<br>
CFLAGS in use: -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC -pthread -O2<br>
Binutils Version: GNU ld (GNU Binutils) 2.22</p>
<p>Configure option:</p>
<p>only --prefix=/usr used.</p>
<p>make[1]: Entering director<br>
gcc -I. -I../../.. -I../..VE_CONFIG_H -DHAVE_OPENSSLfomit-frame-pointer -freru<br>
gcc -I. -I../../.. -I../..VE_CONFIG_H -DHAVE_OPENSSLfomit-frame-pointer -freru<br>
gcc -shared -o ../../../.e -lpthread -rdynamic -Wl,-<br>
make[1]: Leaving directory<br>
compiling digest/sha2<br>
make[1]: Entering director<br>
gcc -I. -I../../.. -I../../../. -I../../.././ext/digest/sha2 -I../../.././ext/digest/sha2/.. -DHAVE_CONFIG_H -DHAVE_SYS_CDEFS_H -DHAVE_INTTYPES_H -DHAVE_UNISTD_H -DHAVE_TYPE_UINT64_T -fPIC -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC -pthread -O2 -c sha2.c<br>
gcc -I. -I../../.. -I../../../. -I../../.././ext/digest/sha2 -I../../.././ext/digest/sha2/.. -DHAVE_CONFIG_H -DHAVE_SYS_CDEFS_H -DHAVE_INTTYPES_H -DHAVE_UNISTD_H -DHAVE_TYPE_UINT64_T -fPIC -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC -pthread -O2 -c sha2init.c<br>
gcc -shared -o ../../../.ext/x86_64-linux/digest/sha2.so sha2.o sha2init.o -L. -L../../.. -L. -lpthread -rdynamic -Wl,-export-dynamic -lrt -ldl -lcrypt -lm -lc<br>
mkdir -p ../../../.ext/common/digest<br>
cp ../../.././ext/digest/sha2/lib/sha2.rb ../../../.ext/common/digest<br>
make[1]: Leaving directory <code>/Depot/jjj/ruby-1.8.7p358/ext/digest/sha2' compiling dl make[1]: Entering directory </code>/Depot/jjj/ruby-1.8.7p358/ext/dl'<br>
gcc -I. -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR -I. -fPIC -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC -pthread -O2 -fno-defer-pop -fno-omit-frame-pointer -c ptr.c<br>
Generating callback.func<br>
Generating cbtable.func<br>
gcc -I. -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR -I. -fPIC -fomit-frame-pointer -frerun-loop-opt -pipe -fPIC -pthread -O2 -fno-defer-pop -fno-omit-frame-pointer -c dl.c<br>
In file included from dl.c:104:0:<br>
callback.func:1:1: warning: data definition has no type or storage class [enabled by default]<br>
callback.func:1:7: error: expected identifier or ‘(’ before ‘long’<br>
In file included from dl.c:104:0:<br>
callback.func:78:33: error: expected ‘)’ before ‘(’ token<br>
callback.func:79:3: warning: data definition has no type or storage class [enabled by default]<br>
callback.func:79:24: error: ‘proc’ undeclared here (not in a function)<br>
callback.func:79:39: error: ‘argc’ undeclared here (not in a function)<br>
callback.func:79:45: error: ‘argv’ undeclared here (not in a function)<br>
callback.func:82:1: error: expected identifier or ‘(’ before ‘}’ token<br>
dl.c:106:1: error: expected ‘;’, ‘,’ or ‘)’ before ‘static’<br>
make[1]: *** [dl.o] Error 1<br>
make[1]: Leaving directory `/Depot/jjj/ruby-1.8.7p358/ext/dl'<br>
make: *** [all] Error 1</p> Ruby master - Feature #6413 (Assigned): Make Dir.entries default to Dir.entries(Dir.pwd)https://redmine.ruby-lang.org/issues/64132012-05-08T22:12:34Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Is there a reason why Dir.entries requires one argument?</p>
<p>I think it would be easier and more convenient for the userruby if it would default to the current directory. Like so:</p>
<p>Dir.entries(i = Dir.pwd)</p>
<p>Or is there a reason why this is not done?</p> Ruby master - Feature #6412 (Rejected): Make Dir.entries default to Dir.entries(Dir.pwd)https://redmine.ruby-lang.org/issues/64122012-05-08T22:12:30Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Is there a reason why Dir.entries requires one argument?</p>
<p>I think it would be easier and more convenient for the userruby if it would default to the current directory. Like so:</p>
<p>Dir.entries(i = Dir.pwd)</p>
<p>Or is there a reason why this is not done?</p> Ruby master - Feature #6336 (Rejected): Allow Ruby hacker to extend a module or a class, without ...https://redmine.ruby-lang.org/issues/63362012-04-22T08:16:32Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi,</p>
<p>Please correct me if I am wrong.</p>
<p>I think in order to extend a module or a class, you must do<br>
something like this (first, two examples, one for module,<br>
one for a class):</p>
<p>module Foo<br>
def test<br>
puts 'This is test from module Foo.'<br>
end<br>
end</p>
<p>class Bar<br>
def test<br>
puts 'This is test from class Bar.'<br>
end<br>
end</p>
<p>Now to modify the behaviour:</p>
<p>module Foo<br>
def test<br>
puts 'This is test from module Foo, but modified.'<br>
end<br>
end</p>
<p>class Bar<br>
def test<br>
puts 'This is test from class Bar, but modified.'<br>
end<br>
end</p>
<p>My question is, why does the Ruby hacker need to know that he<br>
modifies a class or a module? It feels like a (small) obstacle<br>
for no real gain I can see.</p>
<p>I would propose something else like:</p>
<p>extend Bar<br>
def test<br>
puts 'We now modified Bar but we don't care whether it is a module or a class.'<br>
end<br>
end</p>
<p>I am not sure about "extend" as keyword. I thought about other keywords, but I could<br>
not find good ones. So I also have to admit that sticking to "class" and "module" as<br>
we do right now is not a bad solution - because we don't need any new word.</p>
<p>Still I wanted to suggest this, so that I can understand the design decision better.</p>
<p>Thank you for reading.</p> Ruby master - Bug #6335 (Rejected): Allow Ruby hacker to extend a module or a class, without need...https://redmine.ruby-lang.org/issues/63352012-04-22T08:16:29Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi,</p>
<p>Please correct me if I am wrong.</p>
<p>I think in order to extend a module or a class, you must do<br>
something like this (first, two examples, one for module,<br>
one for a class):</p>
<p>module Foo<br>
def test<br>
puts 'This is test from module Foo.'<br>
end<br>
end</p>
<p>class Bar<br>
def test<br>
puts 'This is test from class Bar.'<br>
end<br>
end</p>
<p>Now to modify the behaviour:</p>
<p>module Foo<br>
def test<br>
puts 'This is test from module Foo, but modified.'<br>
end<br>
end</p>
<p>class Bar<br>
def test<br>
puts 'This is test from class Bar, but modified.'<br>
end<br>
end</p>
<p>My question is, why does the Ruby hacker need to know that he<br>
modifies a class or a module? It feels like a (small) obstacle<br>
for no real gain I can see.</p>
<p>I would propose something else like:</p>
<p>extend Bar<br>
def test<br>
puts 'We now modified Bar but we don't care whether it is a module or a class.'<br>
end<br>
end</p>
<p>I am not sure about "extend" as keyword. I thought about other keywords, but I could<br>
not find good ones. So I also have to admit that sticking to "class" and "module" as<br>
we do right now is not a bad solution - because we don't need any new word.</p>
<p>Still I wanted to suggest this, so that I can understand the design decision better.</p>
<p>Thank you for reading.</p> Ruby master - Bug #6186 (Rejected): Bug trying to compile Ruby 1.9.3p105https://redmine.ruby-lang.org/issues/61862012-03-22T13:05:51Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hi!</p>
<p>First my system information:</p>
<p>GCC Version: GCC version 4.4.3<br>
Glibc Version: ldd (GNU libc) 2.11.2<br>
CFLAGS in use: -static -O2 -g<br>
Binutils Version: GNU ld (GNU Binutils) 2.22</p>
<p>I am trying to compile ruby version:</p>
<p>ruby-1.9.3p105</p>
<p>Only configure flag I used was:</p>
<p>--disable-shared (I want to try to get a static version of ruby)</p>
<p>configuring json/generator<br>
configuring json/parser<br>
configuring mathn/complex<br>
configuring mathn/rational<br>
configuring nkf<br>
configuring objspace<br>
configuring openssl<br>
configuring pathname<br>
configuring psych<br>
libyaml is missing. Please install libyaml.<br>
Failed to configure psych. It will not be installed.<br>
configuring pty<br>
configuring racc/cparse<br>
configuring readline<br>
configuring ripper<br>
configuring sdbm<br>
configuring socket<br>
configuring stringio<br>
configuring strscan<br>
configuring syck<br>
configuring syslog<br>
configuring tk<br>
check functions.........<br>
check struct members..<br>
check libraries....<br>
Use ActiveTcl libraries (if available).<br>
Search tclConfig.sh and tkConfig.sh..............................<br>
Fail to find [tclConfig.sh, tkConfig.sh]<br>
Use X11 libraries (or use TK_XINCLUDES/TK_XLIBSW information on tkConfig.sh).<br>
Warning:: cannot find X11 library. tcltklib will not be compiled (tcltklib is disabled on your Ruby. That is, Ruby/Tk will not work). Please check configure options. If your Tcl/Tk don't require X11, please try --without-X11.<br>
Can't find X11 libraries.<br>
So, can't make tcltklib.so which is required by Ruby/Tk.<br>
Failed to configure tk. It will not be installed.<br>
configuring tk/tkutil<br>
Failed to configure tk/tkutil. It will not be installed.<br>
configuring win32ole<br>
Failed to configure win32ole. It will not be installed.<br>
configuring zlib<br>
make[1]: Entering directory <code>/Depot/j/ruby-1.9.3p105' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/-test-/add_suffix'<br>
compiling bug.c<br>
linking shared-object -test-/add_suffix/bug.so<br>
installing default bug libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/-test-/add_suffix' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/-test-/array/resize'<br>
compiling resize.c<br>
linking shared-object -test-/array/resize.so<br>
installing default resize libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/-test-/array/resize' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/-test-/bug-3571'<br>
compiling bug.c<br>
linking shared-object -test-/bug-3571/bug.so<br>
installing default bug libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/-test-/bug-3571' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/-test-/bug-3662'<br>
compiling bug.c<br>
linking shared-object -test-/bug-3662/bug.so<br>
installing default bug libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/-test-/bug-3662' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/-test-/funcall'<br>
compiling passing_block.c<br>
linking shared-object -test-/funcall/funcall.so<br>
installing default funcall libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/-test-/funcall' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/-test-/load/dot.dot'<br>
compiling dot.dot.c<br>
linking shared-object -test-/load/dot.dot/dot.dot.so<br>
installing default dot.dot libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/-test-/load/dot.dot' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/-test-/old_thread_select'<br>
compiling old_thread_select.c<br>
old_thread_select.c: In function 'old_thread_select':<br>
old_thread_select.c:57: warning: 'rb_thread_select' is deprecated (declared at ../../.././include/ruby/intern.h:379)<br>
linking shared-object -test-/old_thread_select/old_thread_select.so<br>
installing default old_thread_select libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/-test-/old_thread_select' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/-test-/st/numhash'<br>
compiling numhash.c<br>
linking shared-object -test-/st/numhash.so<br>
installing default numhash libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/-test-/st/numhash' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/-test-/string'<br>
compiling init.c<br>
compiling set_len.c<br>
compiling modify.c<br>
compiling enc_associate.c<br>
compiling cstr.c<br>
compiling ellipsize.c<br>
linking shared-object -test-/string/string.so<br>
installing default string libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/-test-/string' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/-test-/wait_for_single_fd'<br>
compiling wait_for_single_fd.c<br>
linking shared-object -test-/wait_for_single_fd/wait_for_single_fd.so<br>
installing default wait_for_single_fd libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/-test-/wait_for_single_fd' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/bigdecimal'<br>
compiling bigdecimal.c<br>
linking shared-object bigdecimal.so<br>
installing default bigdecimal libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/bigdecimal' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/continuation'<br>
compiling continuation.c<br>
linking shared-object continuation.so<br>
installing default continuation libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/continuation' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/coverage'<br>
compiling coverage.c<br>
linking shared-object coverage.so<br>
installing default coverage libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/coverage' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/curses'<br>
compiling curses.c<br>
linking shared-object curses.so<br>
installing default curses libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/curses' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/date'<br>
compiling date_strptime.c<br>
compiling date_strftime.c<br>
compiling date_core.c<br>
compiling date_parse.c<br>
linking shared-object date_core.so<br>
installing default date_core libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/date' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/dbm'<br>
compiling dbm.c<br>
linking shared-object dbm.so<br>
installing default dbm libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/dbm' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/digest'<br>
compiling digest.c<br>
linking shared-object digest.so<br>
installing digest libraries<br>
installing default digest libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/digest' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/digest/bubblebabble'<br>
compiling bubblebabble.c<br>
linking shared-object digest/bubblebabble.so<br>
installing default bubblebabble libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/digest/bubblebabble' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/digest/md5'<br>
compiling md5init.c<br>
compiling md5ossl.c<br>
linking shared-object digest/md5.so<br>
installing default md5 libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/digest/md5' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/digest/rmd160'<br>
compiling rmd160init.c<br>
compiling rmd160ossl.c<br>
linking shared-object digest/rmd160.so<br>
installing default rmd160 libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/digest/rmd160' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/digest/sha1'<br>
compiling sha1init.c<br>
compiling sha1ossl.c<br>
linking shared-object digest/sha1.so<br>
installing default sha1 libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/digest/sha1' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/digest/sha2'<br>
compiling sha2init.c<br>
compiling sha2ossl.c<br>
linking shared-object digest/sha2.so<br>
installing default sha2 libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/digest/sha2' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/dl'<br>
compiling cptr.c<br>
compiling cfunc.c<br>
compiling handle.c<br>
compiling dl.c<br>
linking shared-object dl.so<br>
installing dl libraries<br>
installing default dl libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/dl' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/dl/callback'<br>
generating callback.c<br>
compiling callback.c<br>
compiling callback-0.c<br>
compiling callback-1.c<br>
compiling callback-2.c<br>
compiling callback-3.c<br>
compiling callback-4.c<br>
compiling callback-5.c<br>
compiling callback-6.c<br>
compiling callback-7.c<br>
compiling callback-8.c<br>
linking shared-object dl/callback.so<br>
installing default callback libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/dl/callback' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/dl/win32'<br>
make[2]: Nothing to be done for <code>all'. make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/dl/win32'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/etc' compiling etc.c linking shared-object etc.so installing default etc libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/etc'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/fcntl' compiling fcntl.c linking shared-object fcntl.so installing default fcntl libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/fcntl'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/fiber' compiling fiber.c linking shared-object fiber.so installing default fiber libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/fiber'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/fiddle' make[2]: Nothing to be done for </code>all'.<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/fiddle' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/gdbm'<br>
compiling gdbm.c<br>
linking shared-object gdbm.so<br>
installing default gdbm libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/gdbm' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/iconv'<br>
compiling iconv.c<br>
linking shared-object iconv.so<br>
installing default iconv libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/iconv' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/io/console'<br>
compiling console.c<br>
linking shared-object io/console.so<br>
installing default console libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/io/console' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/io/nonblock'<br>
compiling nonblock.c<br>
linking shared-object io/nonblock.so<br>
installing default nonblock libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/io/nonblock' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/io/wait'<br>
compiling wait.c<br>
linking shared-object io/wait.so<br>
installing default wait libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/io/wait' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/json'<br>
installing default libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/json' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/json/generator'<br>
compiling generator.c<br>
linking shared-object json/ext/generator.so<br>
installing default generator libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/json/generator' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/json/parser'<br>
compiling parser.c<br>
linking shared-object json/ext/parser.so<br>
installing default parser libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/json/parser' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/mathn/complex'<br>
compiling complex.c<br>
linking shared-object mathn/complex.so<br>
installing default complex libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/mathn/complex' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/mathn/rational'<br>
compiling rational.c<br>
linking shared-object mathn/rational.so<br>
installing default rational libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/mathn/rational' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/nkf'<br>
compiling nkf.c<br>
linking shared-object nkf.so<br>
installing default nkf libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/nkf' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/objspace'<br>
compiling objspace.c<br>
linking shared-object objspace.so<br>
installing default objspace libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/objspace' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/openssl'<br>
compiling ossl_pkey_dsa.c<br>
compiling ossl_ssl.c<br>
compiling ossl_ocsp.c<br>
compiling ossl_digest.c<br>
compiling ossl_ssl_session.c<br>
compiling ossl_x509req.c<br>
compiling ossl_pkcs5.c<br>
compiling ossl_x509store.c<br>
compiling ossl_x509crl.c<br>
compiling ossl_hmac.c<br>
compiling ossl_ns_spki.c<br>
compiling ossl_pkcs7.c<br>
compiling ossl.c<br>
compiling ossl_x509cert.c<br>
compiling ossl_x509revoked.c<br>
compiling ossl_x509name.c<br>
compiling ossl_x509.c<br>
compiling ossl_x509attr.c<br>
compiling ossl_engine.c<br>
compiling ossl_pkey_ec.c<br>
compiling ossl_pkey.c<br>
compiling ossl_x509ext.c<br>
compiling openssl_missing.c<br>
compiling ossl_bn.c<br>
compiling ossl_rand.c<br>
compiling ossl_pkcs12.c<br>
compiling ossl_pkey_rsa.c<br>
compiling ossl_bio.c<br>
compiling ossl_asn1.c<br>
compiling ossl_pkey_dh.c<br>
compiling ossl_config.c<br>
compiling ossl_cipher.c<br>
linking shared-object openssl.so<br>
installing default openssl libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/openssl' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/pathname'<br>
compiling pathname.c<br>
linking shared-object pathname.so<br>
installing default pathname libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/pathname' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/psych'<br>
make[2]: Nothing to be done for <code>all'. make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/psych'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/pty' compiling pty.c linking shared-object pty.so installing default pty libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/pty'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/racc/cparse' compiling cparse.c linking shared-object racc/cparse.so installing default cparse libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/racc/cparse'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/readline' compiling readline.c linking shared-object readline.so installing default readline libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/readline'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/ripper' compiling ripper.c linking shared-object ripper.so installing default ripper libraries checking ../.././parse.y and ../.././ext/ripper/eventids2.c make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/ripper'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/sdbm' compiling init.c compiling _sdbm.c linking shared-object sdbm.so installing default sdbm libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/sdbm'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/socket' generating constant definitions compiling init.c compiling constants.c compiling basicsocket.c compiling socket.c compiling ipsocket.c compiling tcpsocket.c compiling tcpserver.c compiling sockssocket.c compiling udpsocket.c compiling unixsocket.c compiling unixserver.c compiling option.c compiling ancdata.c compiling raddrinfo.c linking shared-object socket.so installing default socket libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/socket'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/stringio' compiling stringio.c linking shared-object stringio.so installing default stringio libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/stringio'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/strscan' compiling strscan.c linking shared-object strscan.so installing default strscan libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/strscan'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/syck' compiling implicit.c compiling yaml2byte.c compiling syck.c compiling token.c compiling gram.c compiling rubyext.c compiling handler.c compiling emitter.c compiling node.c compiling bytecode.c linking shared-object syck.so installing default syck libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/syck'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/syslog' compiling syslog.c linking shared-object syslog.so installing default syslog libraries make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/syslog'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/tk' make[2]: Nothing to be done for </code>all'.<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/tk' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/tk/tkutil'<br>
make[2]: Nothing to be done for <code>all'. make[2]: Leaving directory </code>/Depot/j/ruby-1.9.3p105/ext/tk/tkutil'<br>
make[2]: Entering directory <code>/Depot/j/ruby-1.9.3p105/ext/win32ole' make[2]: Nothing to be done for </code>all'.<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/win32ole' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105/ext/zlib'<br>
compiling zlib.c<br>
linking shared-object zlib.so<br>
installing default zlib libraries<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105/ext/zlib' make[2]: Entering directory </code>/Depot/j/ruby-1.9.3p105'<br>
linking ruby<br>
./libruby-static.a(dln.o): In function <code>dln_load': /Depot/j/ruby-1.9.3p105/dln.c:1320: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ./libruby-static.a(process.o): In function </code>proc_initgroups':<br>
/Depot/j/ruby-1.9.3p105/process.c:4770: warning: Using 'initgroups' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking<br>
./libruby-static.a(process.o): In function <code>proc_setgroups': /Depot/j/ruby-1.9.3p105/process.c:4724: warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ./libruby-static.a(file.o): In function </code>rb_home_dir':<br>
/Depot/j/ruby-1.9.3p105/file.c:2842: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking<br>
/Depot/j/ruby-1.9.3p105/file.c:2850: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking<br>
make[2]: Leaving directory <code>/Depot/j/ruby-1.9.3p105' make[1]: Leaving directory </code>/Depot/j/ruby-1.9.3p105'<br>
Generating RDoc documentation<br>
/Depot/j/ruby-1.9.3p105/.ext/x86_64-linux/enc/encdb.so: [BUG] Segmentation fault<br>
ruby 1.9.3p105 (2012-02-13 revision 34579) [x86_64-linux]</p>
<p>-- Control frame information -----------------------------------------------<br>
c:0002 p:-1343318 s:0004 b:0004 l:000003 d:000003 TOP<br>
c:0001 p:0000 s:0002 b:0002 l:000168 d:000168 TOP</p>
<p>-- C level backtrace information -------------------------------------------<br>
[0x4dd253]<br>
[0x5158b0]<br>
[0x515a13]<br>
[0x47ff70]<br>
[0x530960]</p>
<p>-- Other runtime information -----------------------------------------------</p>
<ul>
<li>
<p>Loaded script: ./ruby</p>
</li>
<li>
<p>Loaded features:</p>
<p>0 enumerator.so</p>
</li>
<li>
<p>Process memory map:</p>
</li>
</ul>
<p>00400000-006b5000 r-xp 00000000 08:01 9330049 /Depot/j/ruby-1.9.3p105/ruby<br>
008b4000-008b7000 rw-p 002b4000 08:01 9330049 /Depot/j/ruby-1.9.3p105/ruby<br>
008b7000-00a5c000 rw-p 00000000 00:00 0 [heap]<br>
7f5954049000-7f595404a000 rw-p 00000000 00:00 0<br>
7f595404a000-7f5954068000 r-xp 00000000 08:01 7208977 /lib64/ld-2.11.2.so<br>
7f5954068000-7f5954267000 ---p 0001e000 08:01 7208977 /lib64/ld-2.11.2.so<br>
7f5954267000-7f5954268000 r--p 0001d000 08:01 7208977 /lib64/ld-2.11.2.so<br>
7f5954268000-7f5954269000 rw-p 0001e000 08:01 7208977 /lib64/ld-2.11.2.so<br>
7f5954269000-7f595426a000 rw-p 00000000 00:00 0<br>
7f595426a000-7f59543ba000 r-xp 00000000 08:01 7209004 /lib64/libc-2.11.2.so<br>
7f59543ba000-7f59545b9000 ---p 00150000 08:01 7209004 /lib64/libc-2.11.2.so<br>
7f59545b9000-7f59545bd000 r--p 0014f000 08:01 7209004 /lib64/libc-2.11.2.so<br>
7f59545bd000-7f59545be000 rw-p 00153000 08:01 7209004 /lib64/libc-2.11.2.so<br>
7f59545be000-7f59545c3000 rw-p 00000000 00:00 0<br>
7f59545c3000-7f5954643000 r-xp 00000000 08:01 7209058 /lib64/libm-2.11.2.so<br>
7f5954643000-7f5954842000 ---p 00080000 08:01 7209058 /lib64/libm-2.11.2.so<br>
7f5954842000-7f5954843000 r--p 0007f000 08:01 7209058 /lib64/libm-2.11.2.so<br>
7f5954843000-7f5954844000 rw-p 00080000 08:01 7209058 /lib64/libm-2.11.2.so<br>
7f5954844000-7f595484c000 r-xp 00000000 08:01 7209015 /lib64/libcrypt-2.11.2.so<br>
7f595484c000-7f5954a4b000 ---p 00008000 08:01 7209015 /lib64/libcrypt-2.11.2.so<br>
7f5954a4b000-7f5954a4c000 r--p 00007000 08:01 7209015 /lib64/libcrypt-2.11.2.so<br>
7f5954a4c000-7f5954a4d000 rw-p 00008000 08:01 7209015 /lib64/libcrypt-2.11.2.so<br>
7f5954a4d000-7f5954a7b000 rw-p 00000000 00:00 0<br>
7f5954a7b000-7f5954a7d000 r-xp 00000000 08:01 7209025 /lib64/libdl-2.11.2.so<br>
7f5954a7d000-7f5954c7d000 ---p 00002000 08:01 7209025 /lib64/libdl-2.11.2.so<br>
7f5954c7d000-7f5954c7e000 r--p 00002000 08:01 7209025 /lib64/libdl-2.11.2.so<br>
7f5954c7e000-7f5954c7f000 rw-p 00003000 08:01 7209025 /lib64/libdl-2.11.2.so<br>
7f5954c7f000-7f5954c87000 r-xp 00000000 08:01 7209116 /lib64/librt-2.11.2.so<br>
7f5954c87000-7f5954e86000 ---p 00008000 08:01 7209116 /lib64/librt-2.11.2.so<br>
7f5954e86000-7f5954e87000 r--p 00007000 08:01 7209116 /lib64/librt-2.11.2.so<br>
7f5954e87000-7f5954e88000 rw-p 00008000 08:01 7209116 /lib64/librt-2.11.2.so<br>
7f5954e88000-7f5954e9f000 r-xp 00000000 08:01 7209099 /lib64/libpthread-2.11.2.so<br>
7f5954e9f000-7f595509e000 ---p 00017000 08:01 7209099 /lib64/libpthread-2.11.2.so<br>
7f595509e000-7f595509f000 r--p 00016000 08:01 7209099 /lib64/libpthread-2.11.2.so<br>
7f595509f000-7f59550a0000 rw-p 00017000 08:01 7209099 /lib64/libpthread-2.11.2.so<br>
7f59550a0000-7f59550a4000 rw-p 00000000 00:00 0<br>
7f59550a4000-7f59550d3000 r--p 00000000 08:01 4603403 /etc/ld.so.cache<br>
7f59550d3000-7f59550d5000 r-xp 00000000 08:01 3294747 /Depot/j/ruby-1.9.3p105/.ext/x86_64-linux/enc/encdb.so<br>
7f59550d5000-7f59552d4000 ---p 00002000 08:01 3294747 /Depot/j/ruby-1.9.3p105/.ext/x86_64-linux/enc/encdb.so<br>
7f59552d4000-7f59552d5000 r--p 00001000 08:01 3294747 /Depot/j/ruby-1.9.3p105/.ext/x86_64-linux/enc/encdb.so<br>
7f59552d5000-7f59552d6000 rw-p 00002000 08:01 3294747 /Depot/j/ruby-1.9.3p105/.ext/x86_64-linux/enc/encdb.so<br>
7f59552d6000-7f59552d7000 ---p 00000000 00:00 0<br>
7f59552d7000-7f59553db000 rw-p 00000000 00:00 0<br>
7fffe4fe3000-7fffe5009000 rw-p 00000000 00:00 0 [stack]<br>
7fffe5161000-7fffe5162000 r-xp 00000000 00:00 0 [vdso]<br>
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]</p>
<p>[NOTE]<br>
You may have encountered a bug in the Ruby interpreter or extension libraries.<br>
Bug reports are welcome.<br>
For details: <a href="http://www.ruby-lang.org/bugreport.html" class="external">http://www.ruby-lang.org/bugreport.html</a></p> Ruby master - Feature #5779 (Rejected): Ruby-FTP - allow easy way to find out whether a remote ta...https://redmine.ruby-lang.org/issues/57792011-12-20T03:51:54Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>Hello.</p>
<p>The FTP documentation of Ruby is at:</p>
<p><a href="http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/ftp/rdoc/index.html" class="external">http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/ftp/rdoc/index.html</a></p>
<p>When you have a local file on your HDD, you can do this:</p>
<p>File.directory? '/tmp' # => true<br>
File.file? '/etc/ld.so.conf' # => true</p>
<p>I propose something like that to be added to the Ruby-FTP library too.</p>
<p>So that a user can find out whether something is a file or a directory,<br>
without the need to download it, or parse the .list output manually.</p>
<p>This is mostly for convenience.</p> Ruby master - Feature #5716 (Closed): duplicated when clause is ignored -> Report which clause it...https://redmine.ruby-lang.org/issues/57162011-12-06T19:07:29Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>In latest Ruby 1.9.3, if you have warnings enabled, you get information like this here:</p>
<p>foobar.rb:24: warning: duplicated when clause is ignored</p>
<p>This error comes from the file:</p>
<p>compile.c</p>
<p>rb_compile_warning(RSTRING_PTR(iseq->filename), iobj->line_no,<br>
"duplicated when clause is ignored");</p>
<p>This is called, it seems, when the prior function fails:</p>
<p>rb_hash_aset(map, obj, INT2FIX(lobj->position - (pos+len)));</p>
<p>As a user of Ruby, the warning should be better.</p>
<p>Rather than:</p>
<p>foobar.rb:24: warning: duplicated when clause is ignored</p>
<p>I would like to see:</p>
<p>foobar.rb:24: warning: duplicated when clause 'foo' is ignored.</p>
<p>This way, I can scan through the file with the case/when structure<br>
and correct this error. But right now, if you have a very long<br>
case/when structure, you have no idea WHICH clause is duplicated.</p>
<p>The warning message just vaguely says that there is, and this is<br>
not very helpful information.</p> Ruby master - Feature #5610 (Closed): Allow strings as input for Process.uid=https://redmine.ruby-lang.org/issues/56102011-11-11T06:19:53Zshevegen (Robert A. Heiler)shevegen@gmail.com
<p>On my unix system I often have a "debug" user account, belonging to the "debug" group.</p>
<p>With:</p>
<p>Process.euid</p>
<p>You can find out the effective uid and you can change it via =.</p>
<p>Process.euid = 522</p>
<p>That works. Today I tried to do this though:</p>
<p>Process.euid = "debug"</p>
<p>It does not work because .euid= wants a string.</p>
<p>Would it not be better to be more flexible than that? Internally it<br>
could be converted into a number anyway as /etc/passwd can be<br>
read. And if it can not be converted, an exception could be raised.</p>
<p>At least for me that would be quite convenient, no idea if this has<br>
merit for others, but then again it is just a proposal. :)</p>
<p>Thank you for reading.</p>