Project

General

Profile

Activity

From 09/03/2018 to 09/09/2018

09/09/2018

06:42 PM Feature #15095: [PATCH] share VM stack between threads and fibers if identical
Koichi Sasada <[email protected]> wrote:
> On 2018/09/10 2:26, Eric Wong wrote:
> > Sorry, I mean they can share VM stack cache; not the in-use VM stack.
>
> It makes sense.
>
> But I remember that Fiber stack is smaller than Thread...
normalperson (Eric Wong)
06:03 PM Feature #15095: [PATCH] share VM stack between threads and fibers if identical
On 2018/09/10 2:26, Eric Wong wrote:
> Sorry, I mean they can share VM stack cache; not the in-use VM stack.

It makes sense.

But I remember that Fiber stack is smaller than Thread VM stack because
of rough estimation (Fiber may...
ko1 (Koichi Sasada)
06:03 PM Feature #15095: [PATCH] share VM stack between threads and fibers if identical
On 2018/09/10 2:31, Eric Wong wrote:
> OK, I thought that was the case. But no plans to use `const' here
> in the future, right? In other words, this patch should be OK?
Not sure about the future.
But it is okay to commit your pat...
ko1 (Koichi Sasada)
05:32 PM Feature #15095: [PATCH] share VM stack between threads and fibers if identical
[email protected] wrote:
> normalperson (Eric Wong) wrote:
> > Also, why cast in ec_set_vm_stack?
> > https://80x24.org/spew/[email protected]/raw
> > I've barely touched code this week, so maybe I forgot something :x...
normalperson (Eric Wong)
05:32 PM Feature #15095: [PATCH] share VM stack between threads and fibers if identical
[email protected] wrote:
> > ec->vm_stack is always allocated with malloc, so stacks for root
> > fiber (thread stack) and non-root fibers can be shared as long
> > as the size is the same.
>
> I'm not sure why we can share the VM sta...
normalperson (Eric Wong)
03:50 PM Feature #15095: [PATCH] share VM stack between threads and fibers if identical
normalperson (Eric Wong) wrote:
> Also, why cast in ec_set_vm_stack?
> ...
Yes. These fields were `const` at least on my laptop to modify something.
ko1 (Koichi Sasada)
03:48 PM Feature #15095: [PATCH] share VM stack between threads and fibers if identical
> ec->vm_stack is always allocated with malloc, so stacks for root
> ...
I'm not sure why we can share the VM stack. If we run root fiber and non-root fiber with switching, it will conflicts.
Do I misunderstand something?
ko1 (Koichi Sasada)
08:12 AM Feature #15095: [PATCH] share VM stack between threads and fibers if identical
Also, why cast in ec_set_vm_stack?
https://80x24.org/spew/[email protected]/raw
I've barely touched code this week, so maybe I forgot something :x
normalperson (Eric Wong)
07:56 AM Feature #15095 (Closed): [PATCH] share VM stack between threads and fibers if identical
ec->vm_stack is always allocated with malloc, so stacks for root
fiber (thread stack) and non-root fibers can be shared as long
as the size is the same. The purpose of this change was mainly
to reduce dependencies on ROOT_FIBER_CONTE...
normalperson (Eric Wong)
03:43 PM Bug #15088 (Rejected): Leaky behaviour when GC disabled
Thank you Eric.
This is my 2nd experiment:
```
...
# adding the following code to original trial code.
GC.start
puts"After2 - All: #{ObjectSpace.each_object.count}"
puts"After2 - Symbols: #{Symbol.all_symbols.size}"
```
...
ko1 (Koichi Sasada)
02:01 PM Feature #15093: Retrive Array elements with infinite ranges specified by Float::INFINITY
This could be fixed, at least in theory, but in practice this is no longer an issue: use endless range
```
a[0...] # => [1, 2, 3, 4]
```
I'm unsure if we should change the behavior, since it allows catching of subtle errors where...
marcandre (Marc-Andre Lafortune)
09:24 AM Feature #15093: Retrive Array elements with infinite ranges specified by Float::INFINITY
I can not say much about the reasoning (I am neutral there) but
I agree in one regards - if we use a large number, we get all
Array members:
a = [1,2,3,4] # => [1, 2, 3, 4]
a[0..111111111] # => [1, 2, 3, 4]
So from thi...
shevegen (Robert A. Heiler)
03:04 AM Feature #15093 (Open): Retrive Array elements with infinite ranges specified by Float::INFINITY
Currently in Ruby head (2.6) the following gives an error:
~~~ ruby
2.6-head :001 > a = [1,2,3,4]
# => [1, 2, 3, 4]
2.6-head :002 > a[0..Float::INFINITY]
#Traceback (most recent call last):
# 2: from /home/sameer/.rvm/rubie...
v0dro (Sameer Deshmukh)
01:57 PM Feature #15092: Provide step count in Range constructor
v0dro (Sameer Deshmukh) wrote:
> Advantages of changing the constructor:
> ...
Very debatable.
> * Consistency in specifying step count in constructor (simple and straightforward way) and using
> ...
It's actually not consistent, s...
marcandre (Marc-Andre Lafortune)
09:19 AM Feature #15092: Provide step count in Range constructor
> Wouldn't the result be [1, 4, 7, 10, 13]?
Off-by-one is ... common. :)
A bit more on topic, Float::INFINITY is quite long. Could
we not use :infinity to refer to it in some methods or
something shorter? I think ruby users shou...
shevegen (Robert A. Heiler)
03:37 AM Feature #15092: Provide step count in Range constructor
v0dro (Sameer Deshmukh) wrote:
> I would like to propose making changes to the Range constructor so that a user can specify
> ...
The array will return `[1,4,7,10]`. Sorry for previous mistake.
v0dro (Sameer Deshmukh)
03:36 AM Feature #15092: Provide step count in Range constructor
> Wouldn't the result be [1, 4, 7, 10, 13]?
Ah yes. My bad. Editing the description. Thank you.
v0dro (Sameer Deshmukh)
03:12 AM Feature #15092: Provide step count in Range constructor
v0dro (Sameer Deshmukh) wrote:
> And I want the values `1`, `4`, `7`, `10` and `12`, I can simply specify a Range like this:
> ...
Wouldn't the result be `[1, 4, 7, 10, 13]`?
duerst (Martin Dürst)
02:59 AM Feature #15092: Provide step count in Range constructor
Advantages of changing the constructor:
* Makes it easy to read test code for someone new to Ruby.
* Consistency in specifying step count in constructor (simple and straightforward way) and using
the shorter syntax (idiomatic Ruby way...
v0dro (Sameer Deshmukh)
02:42 AM Feature #15092 (Feedback): Provide step count in Range constructor
No need to change the constructor. Instead of:
```
Range.new 0, Float::INFINITY, 3
```
Use the shorter
```
(0...) % 3
```
marcandre (Marc-Andre Lafortune)
02:28 AM Feature #15092 (Rejected): Provide step count in Range constructor

I would like to propose making changes to the Range constructor so that a user can specify
a `step` count along with `start` and `stop`. Since Ruby 2.6 will introduce a `step` property
in Ranges anyway I think this will be a useful a...
v0dro (Sameer Deshmukh)
01:06 PM Bug #15091: [solaris] encdb.h.tmpl segfault
thanks @nobu
but now I have an error
```
error Unknown version qsort_s
```
the build passed without this line
https://github.com/ruby/ruby/commit/8e9a8c043ef5b16a2f13999bd2c5d59d61dd00d1#diff-6d7e72ea1ca2b7d0258e568a155084bdR219
ahorek (Pavel Rosický)
07:49 AM Bug #15091 (Closed): [solaris] encdb.h.tmpl segfault
Applied in changeset trunk|r64661.
----------
util.c: qsort_s in C11
* configure.ac: macro for C11 to use qsort_s.
* util.c (ruby_qsort): fix for C11 qsort_s. the comparison function
for MSVCRT qsort_s is compatible with BSD qsort_...
nobu (Nobuyoshi Nakada)
10:12 AM Bug #15050: GC after forking with fibers crashes
Koichi Sasada <[email protected]> wrote:
> Ok. We need to avoid this kind of crash.
>
> https://bugs.ruby-lang.org/issues/15050

OK, I think I fixed the issue (also including [Feature #15095])

Greg, there's a small win32-specific c...
normalperson (Eric Wong)
05:28 AM Feature #14927: Loading multiple files at once
nobu (Nobuyoshi Nakada) wrote:
> Doesn't the order matter?
Very often, it does not. If it does, one can always require the one that's needed first, say, then require the whole directory; require won't load the same file twice so this...
marcandre (Marc-Andre Lafortune)
04:33 AM Feature #14927: Loading multiple files at once
shevegen (Robert A. Heiler) wrote:
> In the event that the project may be relocated, here is the
> ...
Doesn't the order matter?
nobu (Nobuyoshi Nakada)
03:33 AM Feature #14183: "Real" keyword argument
After working a lot on `**{}`, I still strongly believe that we must maintain conversion of keyword arguments to positional argument, e.g.:
```
def foo(*ary)
end
foo(kw: 1) # => must remain ok
```
OTOH, it may be possible to di...
marcandre (Marc-Andre Lafortune)
03:27 AM Bug #15078: Hash splat of empty hash should not create a positional argument.
mame (Yusuke Endoh) wrote:
> I'd like to agree with you, but also really like to fix #15052. Do you find a good semantics of **hash to satisfy both this ticket and that one?
This is a long post, sorry.
* Summary *
I agree that ...
marcandre (Marc-Andre Lafortune)
02:31 AM Feature #15074: Create 'official' C API documentation on ruby-doc.org
Alright. So as a first step can you please tell me how it would be possible to create
this page for the C API? Or maybe start with the wiki?
I can send a PR with some preliminary docs once you approve a course of action.
v0dro (Sameer Deshmukh)

09/08/2018

10:12 PM Bug #15091: [solaris] encdb.h.tmpl segfault
[email protected] wrote:
> https://bugs.ruby-lang.org/issues/15091
> ```
> https://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html

Weird, I'm not familiar with Solaris versions, but it seems our
CI machi...
normalperson (Eric Wong)
04:31 PM Bug #15091 (Closed): [solaris] encdb.h.tmpl segfault
gcc -v
```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gcc/7/lib/gcc/x86_64-pc-solaris2.11/7.3.0/lto-wrapper
Target: x86_64-pc-solaris2.11
Configured with: /builds/ulhg/workspace/Solaris_11u4/Userland/full-build/...
ahorek (Pavel Rosický)
02:35 PM Feature #14927: Loading multiple files at once
I thought about creating a new issue but then I remembered that
the issue here refers to a similar use case that I wanted to
show.
Take the following link as an example:
https://github.com/jordansissel/fpm/blob/master/lib/fpm.rb
...
shevegen (Robert A. Heiler)
06:50 AM Feature #15085: Decrease memory cache usage of MJIT
As long as I can see from the benchmark result for the improved case, it looks good. But at least I would like to see micro benchmarks for opt_send_without_block and send. Because of _mjit_compile_send, it may not be affected so much tho... k0kubun (Takashi Kokubun)

09/07/2018

09:03 PM Bug #15088: Leaky behaviour when GC disabled
[email protected] wrote:
> https://bugs.ruby-lang.org/issues/15088

> 100_000.times do |i|
> "to_sym_#{i}".to_sym
> end
>
> GC.enable
> GC.start

You need at least another call to GC.start, here.

I think it is because g...
normalperson (Eric Wong)
03:59 PM Bug #15088 (Rejected): Leaky behaviour when GC disabled
Hello
I've observed some leaky behaviour when creating dynamic Symbols ("string".to_sym) when GC is disabled. Creating a dynamic symbol after running `GC.disable` creates an extra string allocation that isn't garbage collected when GC...
william101 (William Tabi)
04:36 PM Bug #15078: Hash splat of empty hash should not create a positional argument.
marcandre (Marc-Andre Lafortune) wrote:
> First, I hope we can agree that `any(**{})` and `any(**Hash.new)` should have the exact same result (for any definition of `any`).
Of course :-)
> ...
What do you think about #15052?
...
mame (Yusuke Endoh)
03:07 PM Bug #15087: Segmentation fault with splat and block
Good catch. My patch for #15052 will fix this issue. mame (Yusuke Endoh)
02:58 PM Bug #15087 (Closed): Segmentation fault with splat and block
The following code produces segmentation faults in Ruby 2.5.0, 2.5.1, and 2.6.0dev (2018-09-07 trunk 64656). This code worked in Ruby 2.4.1.
~~~ ruby
test_proc = Proc.new { "test" }
def foo(bar: 1, &block)
yield
end
foo(**{}, &...
jacobevelyn (Jacob Evelyn)
01:48 PM Feature #15066: Documentation and providing better API for accessing Complex numbers functions in C extensions

>
> ...
As Benoit says (rightly), I don't think we need a very elaborate API. Therefore the following functions would be sufficient:
* Constructor from double: Something like `rb_complex_new(double real, double imag)`.
* Access r...
v0dro (Sameer Deshmukh)

09/06/2018

11:25 PM Feature #15085 (Rejected): Decrease memory cache usage of MJIT
MJIT makes ruby-methods faster by ordinary, but I have observed that some cases are exceptional.
I guess the one is caused by `invokesuper` instruction.
And I guess it is related to memory caching, especially iTLB.
Attached "export-...
wanabe (_ wanabe)
06:50 PM Bug #15078: Hash splat of empty hash should not create a positional argument.
First, I hope we can agree that `any(**{})` and `any(**Hash.new)` should have the exact same result (for any definition of `any`).
So the question is: what should the result be?
For me, writing `**hash` means "do as if I had writte...
marcandre (Marc-Andre Lafortune)
03:51 AM Bug #15078: Hash splat of empty hash should not create a positional argument.
It is also related to
https://bugs.ruby-lang.org/issues/11860
https://bugs.ruby-lang.org/issues/12022
https://bugs.ruby-lang.org/issues/10708
sawa (Tsuyoshi Sawada)
05:44 PM Bug #14716: SecureRandom throwing an error in Ruby 2.5.1
I worked around this problem by forcing `SecureRandom` to use the OpenSSL gem:
```ruby
module SecureRandom
if RUBY_VERSION == "2.5.1"
class << self
def gen_random(n)
begin
require 'openssl'
rescue N...
patbl (Patrick Brinich-Langlois)
05:42 PM Bug #14999: ConditionVariable doesn't reacquire the Mutex if Thread#kill-ed
[email protected] wrote:
> Issue #14999 has been updated by larskanis (Lars Kanis).
> > > So it seems it doesn't happen in Ruby <= 2.5 due to thread
> > > caching being disabled then?
> >
> > Right; but that might just ...
normalperson (Eric Wong)
05:23 PM Bug #15084 (Closed): Backport r64476
This affects 2.4.4 as reported by Lars: [ruby-core:88852]
I expect it to affect all 2.x versions, even. [Bug #14999]
"thread_sync.c (rb_mutex_sleep): disable interrupt checking in ensure"
Should be straightforward despite the ti...
normalperson (Eric Wong)
11:28 AM Bug #15082: Memory leak in net/http/response and net/http/header
Upon further inspection, it seems duplicating long text with interpolation allocates an extra string(frozen). You can observe this using the following script.
~~~
def string_info
GC.disable
obj_ids = []
final_ids = []
obj_s...
chopraanmol1 (Anmol Chopra)
09:45 AM Bug #15082: Memory leak in net/http/response and net/http/header
It can be an issue related to MemoryProfiler or some edge case to ObjectSpace.trace_object_allocations_start
The following code also result in a similar result:
~~~
MemoryProfiler.report{ 200.times{|i| "SOME RANDOM TEXT#{i}: SOME ...
chopraanmol1 (Anmol Chopra)
06:23 AM Bug #15082 (Closed): Memory leak in net/http/response and net/http/header
Hello,
I'm observing a memory leak in net/http with the following script :
~~~
require "net/http"
require "bundler/inline"
gemfile do
gem "memory_profiler"
end
def profile_http_get(n)
uri = URI("http://www.ruby-lang....
alexis (Alexis Bernard)
03:53 AM Bug #14971: error: implicit declaration of function ‘rb_vm_call0
This issue has been masked by #15072, but has resurfaced.
@nobu: Ping!
duerst (Martin Dürst)

09/05/2018

11:15 PM Bug #14885 (Closed): Is documenting-ruby a dead project?
Applied in changeset trunk|r64647.
----------
[DOC] Remove link to dead project
[Bug #14885] [ci skip]
znz (Kazuhiro NISHIYAMA)
11:02 PM Bug #15078: Hash splat of empty hash should not create a positional argument.
It is not so trivial what it should be. If you look at only `foo(**{}) #=> [{}]` itself, it might be non-intuitive, indeed. However, IMO, this is a consequence of the current weird spec of keyword arguments (a keyword hash is passed as... mame (Yusuke Endoh)
04:22 PM Bug #15078 (Closed): Hash splat of empty hash should not create a positional argument.
Looks like #10856 is not completely fixed, but I can't reopen it
```
def foo(*args); args; end
foo(**{}) # => []
foo(**Hash.new) # => [{}], should be []
```
marcandre (Marc-Andre Lafortune)
10:28 PM Bug #15080 (Closed): Work on Benchmark::Tms documentation
Fixes a couple issues with "+param+ is not documented" in lib/benchmark.rb
I would like to contribute more to the documentation, so if there's something I should be doing differently in these tickets, please let me know.
shalmezad (Richard Wardin)
09:52 PM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
[email protected] wrote:
> Issue #13618 has been updated by MSP-Greg (Greg L).
>
>
> @normalperson Eric,
>
> I applied the two patches in 'note 139', and three test suites stopped.. With test-all running parallel, it's diff...
normalperson (Eric Wong)
08:40 PM Bug #15079 (Closed): Documentation missing for Enumerator::Lazy#force
Applied in changeset trunk|r64645.
----------
enumerator.c: [DOC] Enumerator::Lazy#force [ci skip]
added documentation of Enumerator::Lazy#force, just to clarify that it
is an alias of an inherited method. [ruby-core:88872] [Bug #15079]
nobu (Nobuyoshi Nakada)
07:22 PM Bug #15079 (Closed): Documentation missing for Enumerator::Lazy#force
This isn't a bug with the ruby language, but rather with the documentation. (At http://ruby-doc.org/core-2.5.1/Enumerator/Lazy.html)
Expected behavior:
There is documentation for the `#force` method for lazy enumerators.
Actual be...
parker (Parker Finch)
07:06 PM Feature #14473 (Closed): Add Range#subrange?
Applied in changeset trunk|r64640.
----------
range.c: Range#cover? accepts Range object. [Feature #14473]
* range.c (range_cover): add code for range argument.
If the argument is a Range, check it is or is not
covered b...
tarui (Masaya Tarui)
05:17 PM Bug #15070: configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
Thanks for the clue -- it looks like I had `CPPFLAGS=-L /usr/local/opt/[email protected]/include` set globally for some reason (probably having to do with building the mysql gem). Removing that allows `configure` to succeed.
That said, it see...
dmolesuc3 (David Moles)
05:05 PM Feature #14183: "Real" keyword argument
Let me add my voice to that of Benoit and Jeremy: the incompatibility is absolutely not worth it.
I believe that if we fix the few remaining corner cases, improve the error messages and explicitly document how Ruby handles keyword par...
marcandre (Marc-Andre Lafortune)
04:59 PM Feature #14183: "Real" keyword argument
mame (Yusuke Endoh) wrote:
> Braced hash and bare one are inconsistent, even in the current spec.
> ...
The fact that `foo(**h) #=> {}` is a bug. Note that `foo(**{}) # => :default`, as I believe it should. Both should have same res...
marcandre (Marc-Andre Lafortune)
06:47 AM Feature #14183: "Real" keyword argument
mame (Yusuke Endoh) wrote:
> > BTW, `p foo: 1` will no longer work then, and `p({foo: 1})` would be required, which feels very *unlike* Ruby, and is just impractical when debugging.
> ...
Half-joking: I'm not fully satisfied with `p fo...
mame (Yusuke Endoh)
03:01 AM Feature #14183: "Real" keyword argument
Eregon (Benoit Daloze) wrote:
> I would think the number of methods like debug() is a tiny fraction of the number of places we'd need to change if hash-without-braces is no longer supported.
> ...
I think you are too familiar with the ...
mame (Yusuke Endoh)
04:45 PM Bug #11993 (Rejected): foo(hash) is handled like foo(**hash)
First, `foo(b: 1)` has been exactly the same as `foo({b: 1})` since Ruby 1.8 at least. It is parsed exactly the same way. It's syntax sugar.
```
require 'ripper'
Ripper.sexp('foo(a : 1)') == Ripper.sexp('foo({a : 1})') # => true
``...
marcandre (Marc-Andre Lafortune)
04:11 PM Bug #11236: inconsistent behavior using ** vs hash as method parameter
When last argument is hash-like but has keys that are not symbols, we could output instead "wrong number of arguments (2 for 1); note that the last argument has keys that are not symbols and thus was not considered as keyword parameters" marcandre (Marc-Andre Lafortune)
03:44 PM Bug #14130: Keyword arguments are ripped from the middle of hash if argument have default value
This is a bug.
```
test1('River name' => 'Mississippi', length: 2000, 'Country' => 'USA')
# 3. SOURCE: {"River name"=>"Mississippi", "Country"=>"USA"}, OPTS: {:length=>2000} -- It is already a bit weird
```
My understanding is t...
marcandre (Marc-Andre Lafortune)
03:38 PM Bug #13647 (Open): Some weird behaviour with keyword arguments
nobu (Nobuyoshi Nakada) wrote:
> Just an idea to keep the original argument, if something left.
> ...
I agree that if the conversion of a hash-like argument to keyword parameter fails because the keys aren't all symbols, the original o...
marcandre (Marc-Andre Lafortune)
03:25 PM Bug #13336 (Closed): Default Parameters don't work
This is a duplicate of #12717, so closing this. marcandre (Marc-Andre Lafortune)
03:22 PM Bug #12717: Optional argument treated as kwarg
I believe this is as designed.
As I stated previously (https://bugs.ruby-lang.org/issues/11967#note-3), my understanding is that:
* after all mandatory unnamed arguments are filled
* if the last remaining argument is hash-like
* ...
marcandre (Marc-Andre Lafortune)
12:18 PM Bug #14999: ConditionVariable doesn't reacquire the Mutex if Thread#kill-ed
@larskanis Thanks for the report.
I also noticed it happens on RubyCI for Ruby 2.4 and earlier
(example: https://rubyci.org/logs/rubyci.s3.amazonaws.com/arch/ruby-2.4/log/20180905T105615Z.fail.html.gz)
I'm not sure what's best.
@...
Eregon (Benoit Daloze)
07:05 AM Bug #14999: ConditionVariable doesn't reacquire the Mutex if Thread#kill-ed
> > So it seems it doesn't happen in Ruby <= 2.5 due to thread
> ...
I get this error on ruby-2.4.4 [i386-mingw32] and [i386-mingw32] while nightly builds of RubyInstaller: https://ci.appveyor.com/project/larskanis/rubyinstaller2-hbu...
larskanis (Lars Kanis)
11:58 AM Feature #15076: Struct to raise error when keyword arguments used but not enabled
> Will it be clearer if a error is raised instead rather than assigning data incorrectly ?
With the current keyword arguments implementation (see also: [Feature #14183]), we can't distinguish the mistaken situation with one that we re...
k0kubun (Takashi Kokubun)
10:23 AM Feature #15076 (Rejected): Struct to raise error when keyword arguments used but not enabled
```ruby
Info = Struct.new(:name, :country, keyword_init: true)
c = Info.new(name: "myname", country: "Japan")
p c #=> #<struct Info name="myname", country="Japan">
```
nobu (Nobuyoshi Nakada)
08:29 AM Feature #15076 (Rejected): Struct to raise error when keyword arguments used but not enabled
When Struct is used to instantiate object with keyword arguments disabled and yet if instantiated using keyword arguments, the instance fields will be set incorrectly.
Will it be clearer if a error is raised instead rather than assig...
macdevign (Macdevign mac)
11:09 AM Feature #15066: Documentation and providing better API for accessing Complex numbers functions in C extensions
v0dro (Sameer Deshmukh) wrote:
> > Isn't it enough to just use rb_funcall() to call Ruby methods on Complex numbers?
> ...
The existing Ruby methods should already be fast enough for most cases.
C macros/functions for accessing the re...
Eregon (Benoit Daloze)
07:37 AM Feature #15066 (Feedback): Documentation and providing better API for accessing Complex numbers functions in C extensions
v0dro (Sameer Deshmukh) wrote:
> > Isn't it enough to just use rb_funcall() to call Ruby methods on Complex numbers?
> ...
What APIs do you need?
A concrete list, please.
> > RCOMPLEX_SET_REAL and RCOMPLEX_SET_IMAG are internal mac...
nobu (Nobuyoshi Nakada)
04:54 AM Feature #15066: Documentation and providing better API for accessing Complex numbers functions in C extensions
> Isn't it enough to just use rb_funcall() to call Ruby methods on Complex numbers?
Calling Ruby methods in C extensions defeats the purpose of writing a C extension since a non-trivial number of Ruby method calls take up significant ...
v0dro (Sameer Deshmukh)
11:00 AM Feature #15074: Create 'official' C API documentation on ruby-doc.org
I think this would be nice to have. Matz often said that nobody minds if ruby
becomes faster :) - and I think nobody will mind if the documentation becomes
better (qualitatively; but also somewhat more documentation in general).
The...
shevegen (Robert A. Heiler)
05:13 AM Feature #15074 (Open): Create 'official' C API documentation on ruby-doc.org
Currently working with Ruby C API is basically reading a bunch of random
blogs and coming up with a solution based on inputs from various sources
(some of which can be out of date).
The only relevant resource for C API docs with pra...
v0dro (Sameer Deshmukh)
06:18 AM Bug #15072 (Closed): thread.c:4356:5: error: implicit declaration of function ‘ubf_list_atfork’
That fix worked, thanks! Committed with r64635, okay on travis, not sure about other CIs. duerst (Martin Dürst)
04:03 AM Bug #15072: thread.c:4356:5: error: implicit declaration of function ‘ubf_list_atfork’
[email protected] wrote:
> https://bugs.ruby-lang.org/issues/15072

I think copying the macro for win32 for the !USE_UBF_LIST
case should work(*). Can you test and commit if it works?
(too tired and might not be back online s...
normalperson (Eric Wong)
03:01 AM Bug #15072 (Closed): thread.c:4356:5: error: implicit declaration of function ‘ubf_list_atfork’
When compiling on cygwin, I get the following error:
```
compiling thread.c
thread.c: In function ‘rb_thread_atfork_internal’:
thread.c:4356:5: error: implicit declaration of function ‘ubf_list_atfork’ [-Werror=implicit-function-de...
duerst (Martin Dürst)
01:32 AM Bug #15069 (Closed): Backport "suppress warning: 'const' attribute on function returning 'void' "
(Changing status to closed; it triggers backporting process. This doesn't mean rejection.) shyouhei (Shyouhei Urabe)

09/04/2018

11:57 PM Bug #15071 (Closed): RubyVM::MJIT.pause may cause deadlock after compaction
Sometimes I met thread-deadlock while waiting `RubyVM::MJIT.pause`.
Here is a terminal log.
```
$ ruby --disable-gems --jit --jit-verbose=1 --jit-max-cache=3 -e '100.times do |i| eval("def foo#{i}; end; " + "foo#{i}; " * 5); end; Ru...
wanabe (_ wanabe)
11:29 PM Bug #15070 (Feedback): configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
dmolesuc3 (David Moles) wrote:
> ```
> ...
From where does this `-L` option come?
It is a linker option and doesn't need to be in `CFLAGS`.
(and `include` path doesn't seem a library directory).
nobu (Nobuyoshi Nakada)
04:49 PM Bug #15070: configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
Oops, the `config.log` I linked there was from the rvm attempt. But the tarball version [here](https://gist.github.com/dmolesUC3/97f2e20514a68de099d1b23db2b6a5e0) is basically identical. dmolesuc3 (David Moles)
04:22 PM Bug #15070 (Closed): configure fails with (probably spurious) 'something wrong with CFLAGS="-g -O2 "' on macOS High Sierra
## Description
`./configure` fails for Ruby 2.5.1 on macOS High Sierra (10.13.6) with Xcode 9.4.1 (clang-902.0.39.2).
(**Note:** I've seen the same error trying to install 2.4.1 and 2.4.4 with rvm, but haven't bothered downloading ...
dmolesuc3 (David Moles)
10:46 PM Feature #14183: "Real" keyword argument
I agree with Jeremy here, the current idea seems too incompatible and will require too many changes (no matter the gain).
And those changes cannot easily be automated either, they need careful considerations.
I think we need to compr...
Eregon (Benoit Daloze)
09:36 PM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
@normalperson Eric,
I applied the two patches in 'note 139', and three test suites stopped.. With test-all running parallel, it's difficult to tell what caused the issue.
btest - stopped on `#354 test_insns.rb`
spec - the log ...
MSP-Greg (Greg L)
03:17 PM Bug #15069 (Closed): Backport "suppress warning: 'const' attribute on function returning 'void' "
The files `include/ruby/intern.h` and `include/ruby/ruby.h` are used for extension builds, and when a recent gcc is called with -Wall, the build fails. This can cause failures with mkmf for instance in pkg_config() lookup.
The resolvi...
larskanis (Lars Kanis)
02:24 PM Bug #15057 (Rejected): REXML::Text#value returns a double unescaped string in non-raw mode
> 了解しました。atomutil の方にはこちらから報告しておきます。
ありがとうございます。では、このチケットはクローズしておきます。
kou (Kouhei Sutou)
07:08 AM Bug #15057: REXML::Text#value returns a double unescaped string in non-raw mode
>> This ignores the 'raw' attribute setting
> ...
なるほど。`REXML::Element#text` も同様のコメントがあってセマンティクスを変えられないと。残念ですが仕方がないですかね… メジャーバージョンアップの際は再検討していただけると幸いです。
> 互換性は壊したくないので、現状ではatomutilでは次のように使ってもらいたいです。
了解しました。atomutil の方にはこちらから報告し...
rna (Ryosuke Nanba)
05:12 AM Bug #15057: REXML::Text#value returns a double unescaped string in non-raw mode
ありがとうございます。確認できました。
現状の動きが変だという気持ちはわかるのですが、`Text#value`のドキュメントに
> This ignores the 'raw' attribute setting
と書いているので、`raw`のときもそうじゃないときも期待した挙動にするのは、互換性を維持したままではムリなんですよねぇ。
なので、`element1.text = element2.text`という使い方がよくないんですよねぇ。ただ、...
kou (Kouhei Sutou)
12:22 PM Feature #14594: Rethink yield_self's name
And I like pipe too, maybe even more. rosenfeld (Rodrigo Rosenfeld Rosas)
12:21 PM Feature #14594: Rethink yield_self's name
I liked to_be as well. rosenfeld (Rodrigo Rosenfeld Rosas)
02:48 AM Feature #14594: Rethink yield_self's name
This looks **to_be** perfect, I really like this idea! sowieso (So Wieso)
11:38 AM Feature #15066: Documentation and providing better API for accessing Complex numbers functions in C extensions
Isn't it enough to just use rb_funcall() to call Ruby methods on Complex numbers? Eregon (Benoit Daloze)
09:25 AM Feature #15066: Documentation and providing better API for accessing Complex numbers functions in C extensions
`RCOMPLEX_SET_REAL` and `RCOMPLEX_SET_IMAG` are internal macros, and so I think they should not be used outside. nobu (Nobuyoshi Nakada)
06:41 AM Feature #15066 (Closed): Documentation and providing better API for accessing Complex numbers functions in C extensions
Currently there is absolutely no documentation for working with Complex numbers at the level of the C API.
Apart from two macros defined [[here](https://github.com/ruby/ruby/blob/trunk/include/ruby/ruby.h#L1079)] for setting the real ...
v0dro (Sameer Deshmukh)
09:10 AM Misc #14981: DevelopersMeeting20180913Japan
* [Bug #14908] Enumerator::Lazy creates unnecessary Array objects
* Proposed solution is to change arity of Enumerator::Yielder#<< to 1 from -1 and use it internally for lazy enum instead of Enumerator::Yielder#yield. Generally, metho...
chopraanmol1 (Anmol Chopra)
06:47 AM Bug #15067 (Closed): library/socket/socket/getnameinfo_spec.rb always errors with multiple IP addresses hostname
If the hostname is bind with multiple IP addresses, `Socket.getnameinfo` raises `SocketError`.
It's the spec of this method.
```
irb(main):001:0> require "socket"
=> true
irb(main):002:0> Socket.getnameinfo(['AF_INET', 21, 'multi'...
usa (Usaku NAKAMURA)
03:41 AM Bug #15060 (Closed): Broken Appveyor MinGW build - fix GH PR 1945
Applied in changeset trunk|r64628.
----------
Spec updates [Bug #15060] [Fix GH-1495]
From: MSP-Greg <[email protected]>
nobu (Nobuyoshi Nakada)
01:42 AM Bug #15039 (Closed): Random.urandom and SecureRandom arc4random use
Applied in changeset trunk|r64625.
----------
avoid fork-unsafe arc4random implementations
Some old implementaions of arc4random_buf(3) were ARC4 based, or
unsafe when forked, or both. Resort to /dev/urandom for those
known problemati...
shyouhei (Shyouhei Urabe)

09/03/2018

03:29 PM Bug #15039: Random.urandom and SecureRandom arc4random use
shyouhei (Shyouhei Urabe) wrote:
> @naruse Are you willing to provide a fix for this? Or can I commit the proposed #if guard?
Could you commit it?
naruse (Yui NARUSE)
01:04 AM Bug #15039: Random.urandom and SecureRandom arc4random use
@naruse Are you willing to provide a fix for this? Or can I commit the proposed #if guard? shyouhei (Shyouhei Urabe)
01:08 PM Misc #15053: Using -fstack-protector-strong instead of -fstack-protector conditionally.
Thank you for fixing this issue quickly!
jaruga (Jun Aruga)
11:07 AM Bug #14966: 2.5 branch - Appveyor failures - backport missed line
Hello Greg,
Thank you very much for your notice.
I have applied your patch at r64621 in ruby_2_5 branch.
nagachika (Tomoyuki Chikanaga)
09:07 AM Bug #14880: Time#localtime doesn't always seem to respect TZ
nobu (Nobuyoshi Nakada) wrote:
> I feel it'd be better to accept a timezone object as `utc_offset` like [Feature #14850], than setting `ENV`.
I completely agree but the problem is how to compute utc offset for a given time and timezo...
ioquatix (Samuel Williams)
07:41 AM Bug #14880: Time#localtime doesn't always seem to respect TZ
I feel it'd be better to accept a timezone object as `utc_offset` like [Feature #14850], than setting `ENV`.
nobu (Nobuyoshi Nakada)
09:07 AM Bug #15027: When Struct#each method is overriden Struct#select and Struct#to_a use wrong collections
@matz: is the patch from Nobu good enough? Hanmac (Hans Mackowiak)
08:20 AM Bug #13496 (Closed): Patches for MinGW builds - gnu_printf in 'config' & defines.h
Applied in changeset trunk|r64620.
----------
Declare as gnu_printf on mingw
[Bug #13496]
From: MSP-Greg <[email protected]>
nobu (Nobuyoshi Nakada)
07:39 AM Misc #14981: DevelopersMeeting20180913Japan
* [Feature #14850] Add official API for setting timezone on Time (nobu)
* a patch posted.
nobu (Nobuyoshi Nakada)
01:07 AM Misc #14981: DevelopersMeeting20180913Japan
* https://github.com/ruby/ruby/pull/1943
* I want a review by other core devs.
shyouhei (Shyouhei Urabe)
05:40 AM Bug #15057: REXML::Text#value returns a double unescaped string in non-raw mode
> atomutilでそうなるケースを試してみたいので再現するAtomとサンプルコードを提供してもらえませんか?
これでどうでしょう?
~~~
require 'atomutil'
entry = Atom::Entry.new
entry.content = "&lt;br&gt;"
puts entry.to_s
~~~
entry.to_s は実際に投稿する場合 HTTP の request body になります(参照: Atom::C...
rna (Ryosuke Nanba)
12:21 AM Bug #15057: REXML::Text#value returns a double unescaped string in non-raw mode
なるほど。
atomutilでそうなるケースを試してみたいので再現するAtomとサンプルコードを提供してもらえませんか?
kou (Kouhei Sutou)
02:35 AM Feature #14183: "Real" keyword argument
jeremyevans0 (Jeremy Evans) wrote:
> mame (Yusuke Endoh) wrote:
> ...
I think the amount of changes from Ruby 1.8 to Ruby 1.9 depended a lot on what kind of processing your application did, and what kind of data was involved. If you ...
duerst (Martin Dürst)
02:02 AM Bug #15060 (Closed): Broken Appveyor MinGW build - fix GH PR 1945
Currently, the MinGW build is broken. See https://github.com/ruby/ruby/pull/1945
Comparing the build summaries, there were some things that differed between the build and ruby-loco. Both ruby-loco & RubyInstaller2 (RI2) builds use t...
MSP-Greg (Greg L)
 

Also available in: Atom