Activity
From 01/21/2018 to 01/27/2018
01/27/2018
-
11:34 PM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- dsferreira (Daniel Ferreira) wrote:
> We need to create the foundations for a post ruby 3 future in ruby land where async is the standard for the many and not the exception for the few.
> ...
According to the tagline on the homepage, r... -
03:45 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- normalperson (Eric Wong) wrote:
> I'm not sure what you're talking about. I suppose nothing is reliable
Let me try to explain what I think about the async subject in ruby land using a different story:
For me there is ruby core a... -
01:17 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- hsbt (Hiroshi SHIBATA) wrote:
> I've restored missing comments on redmine
Thank you very much Hiroshi.
Feels much better now.
-
01:08 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- normalperson (Eric Wong) wrote:
> Daniel Ferreira <subtileos@gmail.com> wrote:
> ...
Hi, I've restored missing comments on redmine from our mailing list.
It's affected by server maintenance and has some issues with server configuratio... -
01:02 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- Daniel Ferreira <subtileos@gmail.com> wrote:
> Please try to do something about it because the conversation will be
> lost in the future if nothing is done on that respect.
I've contacted @hsbt about it, be patient as he is busy. -
01:02 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- Hi Eric,
It is really a shame that your replies in this thread are not being
added to the issue tracker.
Samuel's reply is there but your reply once again didn't get in.
Please try to do something about it because the conversati... -
01:02 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- samuel@oriontransfer.org wrote:
> In async, I called it `Async::Task`. I think task is a good
> name for this kind of thing. In your case, you might want to
> consider `Thread::Task`. Since, the lexicographic nesting is
> similar to... -
12:58 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- Eric Wong <normalperson@yhbt.net> wrote:
> These two?
Yes Eric. And the last one as well. And I guess this here that I will
send will happen the same.
I believe it will be better to not reply to way while this is broken.
Which ... -
12:58 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- danieldasilvaferreira@gmail.com wrote:
> Hi Eric,
>
> I've been reading this issue and I'm finding it fascinating.
> Let me play here the role of the ruby developer that is seeking to
> understand better the asynchronous ruby capa... -
12:57 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- Hi Eric,
I've been reading this issue and I'm finding it fascinating.
Let me play here the role of the ruby developer that is seeking to
understand better the asynchronous ruby capabilities.
Every time I read threads(conversations... -
12:56 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- > Thinking about this even more; I don't think it's possible to
> preserve round-robin recv_io/accept behavior I want from
> blocking on native threads when sharing descriptors between
> multiple processes.
```
The following exam... -
12:56 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- Eric Wong <normalperson@yhbt.net> wrote:
> hsbt@ruby-lang.org wrote:
> > - Name this "Thread", or something Thread-ish word than Fiber-ish
>
> So if we just use "Thread", then existing Thread becomes M:N?
> I will think about that... -
09:51 PM Feature #14410: Reduce allocations and retained objects in the uri common module
- Yes, tests appear to be passing.
I went with the atomic version here cause there is a giant string Hash and it is way cleaner to apply it to the entire file then work through every string in the Hash -
08:31 AM Feature #14410: Reduce allocations and retained objects in the uri common module
- sam.saffron@gmail.com wrote:
> https://bugs.ruby-lang.org/issues/14410
> https://github.com/ruby/ruby/pull/1801
> diff.txt (1.03 KB)
Careful with "frozen_string_literal: true".
Even with tired eyes I see self.decode_www_form us... -
07:27 AM Feature #14410 (Closed): Reduce allocations and retained objects in the uri common module
- Patch at:
https://github.com/ruby/ruby/pull/1801
require 'memory_profiler'
MemoryProfiler.report do
require 'uri'
end.pretty_print
Before:
Total allocated: 986643 bytes (15159 objects)
Total retained: 246370 bytes ... -
09:04 PM Misc #14395 (Closed): [PATCH] internal.h: add BITFIELD macro - Applied in changeset trunk|r62077.
----------
internal.h: add BITFIELD macro to aid C99 users
I plan to use this macro to pack other enums in the VM.
* internal.h: add BITFIELD macro
* method.h: use BITFIELD for rb_method_visibility_t... - 09:04 PM Revision 46bfa65f (git): internal.h: add BITFIELD macro to aid C99 users
- I plan to use this macro to pack other enums in the VM.
* internal.h: add BITFIELD macro
* method.h: use BITFIELD for rb_method_visibility_t
[ruby-core:85074] [Misc #14395]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62077 b2dd... - 09:04 PM Revision 6cf78f0e (git): * 2018-01-28
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 09:04 PM Revision 72b7bd0a (git): vm_core: use "int" for living_thread_num
- We treat this as "int" through the vm_living_thread_num API
anyways, and "pid_t" is still 32-bits with glibc on 64-bit
platforms. I expect it'll be a long time before anybody needs
more than 2 billion native threads. For now, let's sav... -
08:30 PM Feature #14383: Making prime_division in prime.rb Ruby 3 ready.
- Hi Yusuke.
Ah, we agree, `prime.rb` is not conducive for doing heavy-duty math. :-)
Please look at and play with my [primes-utils](https://github.com/jzakiya/primes-utils) gem.
It has a minimal universal useful set of methods for ... -
05:26 PM Feature #14412 (Assigned): DRb UNIX on local machine: add support for getpeereid() - Hi,
`UNIXSocket` has this method `#getpeereid()` which returns effective user ID and effective group ID.
DRb using `drbunix://` on local machine doesn't support that method. In my use case, I need to verify clients via that method.... -
03:26 PM Feature #14411: URI#secure?
- Thank you for your feedback, Robert! You got it absolutely right in terms of implementation. Base class might always return false, whereas HTTPS class should return true then.
I would be happy to implement it. -
03:03 PM Feature #14411: URI#secure?
- I think this may be a good suggestion, assuming that there is no simpler
API.
The examples on stackoverflow seem very verbose which is often not a
good sign - either the documentation is not good so people can not
find a shorter va... -
02:52 PM Feature #14411 (Open): URI#secure?
- I wonder if some predicate method (say #secure?) could be added to URI::Generic class. Currently the only way to query if uri is secure is:
~~~ ruby
uri.instance_of?(URI::HTTPS)
~~~
Inspired by this question: https://stackoverflo... -
01:55 PM Bug #14409: インストール手順の改善
- `Pathname#to_path` は1.9.3以降ですね。
また、autoconfやrubyが必要になるのはrepositoryから直接作る場合なので、tarballから作る場合では必要な手順が変わります。
その点も明確にしたほうがいいでしょう。 -
07:45 AM Bug #14409: インストール手順の改善
- desription のフォーマットがおかしかったのを修正しました。
-
06:40 AM Bug #14409: インストール手順の改善
- Ruby1.8.7で./configureの実行結果
```
checking for ruby... /usr/bin/ruby
downloading config.guess ... done
tool/downloader.rb:212:in `download': failed to download config.guess (RuntimeError)
NoMethodError: undefined method `to_path' for... -
06:22 AM Bug #14409 (Closed): インストール手順の改善
- 以下の2つのインストール手順の部分を改善した方が良いと思いました。
1. `./configure`の生成に必要なautoconfのバージョンを指定するべき
- 2.68以降
2. config.hとMakefileの生成に必要なRubyのバージョンを指定するべき
- 少なくともto_pathが実装されているバージョン
## 環境
```
$ cat /etc/redhat-release
CentOS release 6.8... -
01:50 PM Revision 6cb01267 (git): insns.def: [DOC] update supported attributes [ci skip]
- which are changed at r62051.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
10:41 AM Bug #14374 (Closed): `for` does not splat elements
- Applied in changeset trunk|r62073.
----------
compile.c: try to convert in massign `for`
* compile.c (compile_for_masgn): try to convert to an Array if an
element of massign `for` is not an Array.
[ruby-core:84931] [Bug #14374] -
10:41 AM Revision 7ea65f9b (git): compile.c: try to convert in massign `for`
- * compile.c (compile_for_masgn): try to convert to an Array if an
element of massign `for` is not an Array.
[ruby-core:84931] [Bug #14374]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
09:41 AM Misc #14222: Mutex.lock is not safe inside signal handler: what is?
- eregontp@gmail.com wrote:
> I think that would be very helpful and help to discuss possible improvements.
> Also explaining why Mutex is problematic (the signal handler can be run between any 2 lines of code, and Mutex is not re-entra... -
09:27 AM Revision d0fa578c (git): array.c: rb_check_to_array
- * array.c (rb_check_to_array): conversion to array by to_a method.
returns nil if not possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
06:29 AM Feature #8977: String#frozen that takes advantage of the deduping
- I think this can be closed as complete cause we have `-"test"` now so we can do it.
-
06:12 AM Bug #14407 (Closed): defined? still returning true for top-level constant when referenced with scope
- Applied in changeset trunk|r62071.
----------
defined? returns nil for toplevel constant lookup
* variable.c (rb_const_defined_0): toplevel constant lookup has
been removed, should return nil too.
[ruby-core:85142] [Bug #14407] [Fi... -
02:40 AM Bug #14407: defined? still returning true for top-level constant when referenced with scope
- Related to https://bugs.ruby-lang.org/issues/11547
-
02:32 AM Bug #14407 (Closed): defined? still returning true for top-level constant when referenced with scope
- ~~~ ruby
class A
end
class B
end
if defined?(A::B)
puts "defined"
puts A::B
else
puts "not defined"
end
~~~
When running this script with ruby 2.5.0 i get:
~~~
defined
Traceback (most recent call last):
... -
06:12 AM Revision 9473f86f (git): defined? returns nil for toplevel constant lookup
- * variable.c (rb_const_defined_0): toplevel constant lookup has
been removed, should return nil too.
[ruby-core:85142] [Bug #14407] [Fix GH-1800]
From: Gonzalo <grzuy0@gmail.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62... -
06:11 AM Revision 17d8433d (git): vcs.rb: prepend DebugSystem to VCS
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
05:59 AM Feature #14405 (Feedback): Add base option to Pathname.glob also
- `Pathname` has `glob` instance method.
```ruby
p Pathname('lib').glob('i*.rb', 0) => [#<Pathname:lib/ipaddr.rb>, #<Pathname:lib/irb.rb>]
```
This looks brief enough. -
05:46 AM Bug #13990: Remove obsoleted Ruby code from lib/rdoc/ruby_token.rb from 2.3 and 2.4
- OK. Thanks. @usa
-
05:42 AM Bug #13990: Remove obsoleted Ruby code from lib/rdoc/ruby_token.rb from 2.3 and 2.4
- Do not reopen it.
Status "Closed" and Backport "REQUIRED" are the signal for backporting. -
05:36 AM Bug #13990: Remove obsoleted Ruby code from lib/rdoc/ruby_token.rb from 2.3 and 2.4
- This ticket was closed but 2.3 and 2.4 is not fixed yet.
@hsbt: Should I reopen this ticket? -
05:45 AM Bug #14406 (Rejected): File.expand_path doesn't expand tilde inside Windows home directory
- abotalov (Andrei Botalov) wrote:
> TMP environment variable on Windows is set to a name that contains a tilde.
"Containing" doesn't mean "starting with".
> ...
These contain a tilde, but do *not* start with.
-
05:35 AM Revision 27db7101 (git): vm_insnhelper.c: avoid intermediate array
- * vm_insnhelper.c (vm_expandarray): get rid of creating
intermediate Array object when conversion failed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
05:20 AM Bug #14408 (Closed): Add hash argument description for GC.stat and GC.latest_gc_info document
- I want to add hash argument description to GC.stat and GC.latest_gc_info document.
I guess this argument is for avoiding probe effect like ObjectSpace.#count_objects.
* https://docs.ruby-lang.org/en/2.5.0/ObjectSpace.html#method-c-... -
04:29 AM Feature #14386: Add option to let Kernel.#system raise error instead of returning false
- That sounds good.
-
04:21 AM Feature #14386: Add option to let Kernel.#system raise error instead of returning false
- `Process::Status#inspect` includes signaled information, etc.
How about add such information instead of exit status number only in error messages?
examples: https://gist.github.com/znz/b3c081d0e63d87af6402e27f514f2f15 -
04:14 AM Revision fe18a623 (git): bare_instructions.rb: show class name on inspect
- as it's helpful for debugging.
I'm not sure what's the good output for RubyVM::TraceInstructions, so I
left it as it is.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
04:14 AM Revision ef83b306 (git): Fix duplicated HAVE_NAN
- And remove redundant `HAVE_*` macros,
and use `USE_RB_*` macros instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
02:24 AM Bug #14391 (Assigned): Integer#digitsが遅い
-
02:04 AM Bug #14391: Integer#digitsが遅い
- 厳密にいえばこの提案とは独立な話な気もしますが、
base が 2の累乗の場合は乗除算は不要で、
さらに高速に処理できるだろうと思います。
(rb_integer_pack を使える気がする) -
02:14 AM Revision 3e458f15 (git): insns2vm.rb: add missing word to help
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
02:14 AM Revision c8e5796f (git): insns2vm.rb: make #generate_parser private
- which is only used by #router.
To make it private, we need to stop defining them on top-level.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:59 AM Revision be27efdb (git): dumper.rb: stop getting --destdir option value
- via current directory. It's kind of a global state and fragile to
implementation changes in other places, and how the `Dir.getwd` is set
is not obvious from just reading around `RubyVM::Dumper#initialize` if
it depends on the global stat... -
01:28 AM Revision d678c274 (git): win32/Makefile.sub: fix typo
- Other places are using RT_VER. So I guess this is correct.
Currently AppVeyor CI is failing and I want to fix that.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:02 AM Feature #14404: Adding writev support to IO#write_nonblock
- janko.marohnic@gmail.com wrote:
> Would it be possible to add this feature to IO#write_nonblock
> as well? IO#write_nonblock is used by the HTTP.rb and Socketry
> gems to implement their "write timeout" feature (the same way
> that ... -
12:55 AM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- vmakarov@redhat.com wrote:
> It mean we need a code to find how many CPUs are on the machine.
We can reuse Etc.nprocessors for most systems in ext/etc/etc.c
01/26/2018
-
07:07 PM Feature #14405: Add base option to Pathname.glob also
- Probably makes sense so people can use either variant by default
depending on their personal preferences.
I personally love "Dir"-related methods; I think Dir[] is probably
the method I use the most in general when I need to find/o... -
02:08 PM Feature #14405 (Closed): Add base option to Pathname.glob also
`Dir.glob` has `base` option since Ruby 2.5.
https://bugs.ruby-lang.org/issues/13056
However `Pathname.glob` does not have the option.
I would like to use `base` option with `Pathname` class.
But I feel `Dir.glob('*.rb', base: 'd...-
05:19 PM Bug #14372: Memory leak in require with Pathnames in the $LOAD_PATH in 2.3/2.4
- Because `Rails.root` is a `Pathname`, it's a fairly common for developers to use Rails.root.join("lib") or something similar in their autoload_paths or eager_load_paths, both of which end up in the $LOAD_PATH and lead to a leak on each c...
-
04:42 PM Bug #14406: File.expand_path doesn't expand tilde inside Windows home directory
- you are wrong it means something different:
~~~ ruby
File.expand_path("~") #=> "C:/Users/h.mackowiak"
~~~
you thing are FAT paths which got that shortage because of "8.3 filename"
https://en.wikipedia.org/wiki/8.3_filename
ru... -
04:29 PM Bug #14406 (Rejected): File.expand_path doesn't expand tilde inside Windows home directory
- TMP environment variable on Windows is set to a name that contains a tilde. `File.expand_path` doesn't currently return an expanded name. I would expect it to do so as its documentation says:
"Converts a pathname to an absolute pathname... - 04:38 PM Revision 7561f7e3 (git): * 2018-01-27
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 04:38 PM Revision d2bd7d7b (git): need to declare the prototype of nan() if missing
- * include/ruby/missing.h (nan): need to declare the prototype of nan() if
missing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:38 PM Revision 78c81718 (git): vcs.rb: old version cannot refine modules
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
01:34 PM Revision eab10990 (git): vcs.rb: dcommit for each commit
- svn to git bridge on ci.ruby-lang.org sometimes stalls when
dcommitting some commits at once.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:27 PM Revision e168963d (git): vcs.rb: debug print in system method
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
11:23 AM Feature #13527: Accept IO object as stdin data in Open3.capture
- Thank you for the patch!
Since IO.copy_stream also accepts IO objects that respond only to #read (and not #readpartial), would it be possible to also permit those objects as :stdin_data (maybe check that the object responds to either ... -
11:12 AM Feature #14404 (Open): Adding writev support to IO#write_nonblock
- In Ruby 2.5 IO#write received writev support (https://github.com/ruby/ruby/commit/3efa7126e5e853f06cdd78d4d88837aeb72a9a3e), allowing it to accept multiple arguments and utilize writev when available.
Would it be possible to add this ... -
10:55 AM Revision c30aed08 (git): error.c: receiver kwarg
- * error.c (name_err_initialize_options): NameError#initialize
accepts receiver. [Feature #14313]
* error.c (nometh_err_initialize_options): pass keyword arguments
to the super method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tr... -
10:55 AM Revision f79d891a (git): test_exception.rb: NameError.new NoMethodError.new
- * test/ruby/test_exception.rb: added tests for NameError.new, and
NoMethodError.new including priv argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
10:55 AM Revision 97d9be79 (git): error.c: [DOC] NoMethodError.new [ci skip]
- * error.c (nometh_err_initialize): [RDOC] added missing optional
argument priv.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
10:55 AM Revision 98c88786 (git): error.c: copy keyword arguments
- * error.c (rb_key_err_new): pass arguments all arguments to the
super method, except for keyword arguments copied to instance
variables. [Feature #14313]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62054 b2dd03c8-39d4-4d8f-98... -
10:16 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- In async, I called it `Async::Task`. I think task is a good name for this kind of thing. In your case, you might want to consider `Thread::Task`. Since, the lexicographic nesting is similar to the logical nesting.
Regarding kqueue bug... -
06:41 AM Revision ba4aba0d (git): error.c: KeyError missing keyword arguments
- * error.c (key_err_initialize): leave attributes for missing
keyword arguments unset, so accessors can tell if it is missing
or explicit nil. [Feature #14313]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62053 b2dd03c8-39d4-4d... -
06:30 AM Revision 6b61e99e (git): treat PC for gc events
- ADD_PCs moved. That didn't change vast majority of event hooks
because vm_traece() has been placed before ADD_PC. However for GC
events the situation is different. We have to take care.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@... -
06:30 AM Revision 3234245a (git): move ADD_PC around to optimize PC manipluiations
- This commit introduces new attribute handles_flame and if that is
_not_ the case, places ADD_PC right after INC_SP. This improves
locality of PC manipulations to prevents unnecessary register spill-
outs. As a result, it reduces the siz... -
05:38 AM Feature #14313: Support creating KeyError with receiver and key from Ruby
- Shouldn't unspecified attribute raise an exception?
```diff
diff --git c/error.c i/error.c
index 990f9f7855..7870e58035 100644
--- c/error.c
+++ i/error.c
@@ -1692,8 +1692,6 @@ key_err_initialize(int argc, VALUE *argv, VALUE self... -
04:51 AM Feature #14313 (Closed): Support creating KeyError with receiver and key from Ruby
- Applied in changeset trunk|r62049.
----------
KeyError#initialize accepts receiver and key.
[Feature #14313][ruby-core:84626] -
05:34 AM Revision b56f6a6b (git): error.c: use already initialized IDs
- [Feature #14313]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 04:51 AM Revision cd83d267 (git): KeyError#initialize accepts receiver and key.
- [Feature #14313][ruby-core:84626]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
04:03 AM Feature #4938: Add Random.bytes [patch]
- Updated.
```diff
diff --git i/random.c w/random.c
index 43a3d2ffee..b800f1d9a1 100644
--- i/random.c
+++ w/random.c
@@ -1134,6 +1134,19 @@ rb_random_bytes(VALUE obj, long n)
return genrand_bytes(rnd, n);
}
+/*
+ * ca... -
03:54 AM Revision 4fb218f9 (git): Removed workaround Travis CI.
- Revert r61209, r61210
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
03:41 AM Revision db1de35a (git): optparse.rb: froze string literals
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
03:38 AM Bug #14387: Ruby 2.5 を Alpine Linux で実行すると比較的浅めで SystemStackError 例外になる
- 環境変数 `RUBY_THREAD_MACHINE_STACK_SIZE` に 1048576 とか大きい値を設定してみたら動きますか?
これで pthread_attr_setstacksize に渡すスタックサイズを調整できます。
なお、この設定は RubyVM::DEFAULT_PARAMS で読み出すことができます。
```
$ ruby -ve 'p RubyVM::DEFAULT_PARAMS[:thread_machine_stack_si... -
02:54 AM Bug #14387: Ruby 2.5 を Alpine Linux で実行すると比較的浅めで SystemStackError 例外になる
- https://qiita.com/koshigoe/items/7acebbab7b44fa2b35bc
This is the post that spin off this issue ticket.
There are more information in there.
Hope we could get some form of resolution for Alpine users. -
03:13 AM Revision f3668844 (git): ignore external library sources [ci skip]
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
03:13 AM Revision acdc2f09 (git): ext/psych/.gitignore: removed stale file [ci skip]
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
02:22 AM Feature #14223: Refinements で定義した #to_proc が &hoge 時に呼ばれないのを緩和する提案
- ありがとうございます!
- 02:01 AM Revision 9c7caa3b (git): Fix rubyspec against the change in Hash#transform_keys!
- [Bug #14380] [ruby-core:84951]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:33 AM Bug #14380 (Closed): Expected transform_keys! to work just as transform_keys, but it doesn't
- Applied in changeset trunk|r62042.
----------
hash.c: support key swapping in Hash#transform_keys!
* hash.c (rb_hash_transform_keys_bang): support key swapping in
Hash#transform_keys!
[Bug #14380] [ruby-core:84951]
* test/ruby/tes... - 01:33 AM Revision e7c62ca7 (git): * 2018-01-26
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 01:33 AM Revision 52bb93c2 (git): hash.c: support key swapping in Hash#transform_keys!
- * hash.c (rb_hash_transform_keys_bang): support key swapping in
Hash#transform_keys!
[Bug #14380] [ruby-core:84951]
* test/ruby/test_hash.rb (test_transform_keys_bang):
add assertions for this change
git-svn-id: svn+ssh://ci.ruby...
01/25/2018
-
11:53 PM Bug #14402 (Closed): Crash and coredump (Stack consistency error) on ruby 2.5.0
-
06:07 PM Bug #14402: Crash and coredump (Stack consistency error) on ruby 2.5.0
- Sorry accidentally double-reported, the issue tracker gave me an error on first submit and I thought it hadn't been submitted. Close in favor of https://bugs.ruby-lang.org/issues/14403
-
04:39 PM Bug #14402 (Closed): Crash and coredump (Stack consistency error) on ruby 2.5.0
- This reproduction script seems to make no sense, because it's extracted from an actual program where I encountered this bug, and trimmed down to be the minimal I can get to reproduce.
Parts of the script that seem irrelevant (like th... -
11:02 PM Bug #14387: Ruby 2.5 を Alpine Linux で実行すると比較的浅めで SystemStackError 例外になる
- koshigoe (Masataka SUZUKI) wrote:
> Ruby のバージョンによって、再帰が止められるまでの回数に大きな違いがあるのはなぜでしょうか?
> ...
`git bisect` で確認したところ、 r59630 以降に今の挙動になっているようでした。
r59630 は [Bug #13412] に関連したコミットで、差分を見ると `stack_check(th)` というところから、スレットのスタックをチェックする処理が追加されている... -
10:25 PM Feature #14394: Class.descendants
- I think one part of the discussion was that this features requires classes to explicitly track their subclasses (which is a memory overhead, and it must be a list of weak references to avoid leaking subclasses).
I think MRI now tracks s... -
09:29 PM Feature #14394: Class.descendants
- @Hanmac yeah, registering with a method or a static list is common practice. But I feel like Ruby can do better.
For many cases, it's possible to track them with the inherited hook, @Erogon. But for something so fundamental, why not i... -
02:34 PM Feature #14394: Class.descendants
- "Class#inherited hook" works not for core classes because they are defined before you can define the hook
also should that show only named classes or anonymous somehow too?
@ridiculous: i often see a register method where you regis... -
12:18 PM Feature #14394: Class.descendants
- Could that work with just the Class#inherited hook?
What's the advantage of asking all subclasses/descendents of a class instead? -
06:41 PM Feature #14399: Add Enumerable#product
- That's interesting because I never intuitively understood the use
of `inject`, especially for numerical purposes, and always now use
`reduce`, which was (I believe) created by Haskell (the person and
programming language), and has l... -
10:42 AM Feature #14399: Add Enumerable#product
- > which is a little longer, but I think is more accurately
> ...
We are back to the ancient problem - giving things good names. :-)
The only name from the above that I like is .sum - the others
do not tell me much at all. ;-)
I a... -
01:29 AM Feature #14399: Add Enumerable#product
- Actually, after looking at the docs for `Array#product` a
better name would be `Array#combinations`, which is a little
longer, but I think is more accurately descriptive and intuitive.
Oh well, cats out the bag now. -
01:22 AM Feature #14399: Add Enumerable#product
- Duh, ok, its an `Array` method.
-
01:20 AM Feature #14399: Add Enumerable#product
- I looked here https://ruby-doc.org/core-2.5.0/Enumerable.html and didn't see
that method, so I didn't know it existed. But `multiply` would also work.
Where in the docs is `product`?
The Ruby `product` then causes a conflict with ... -
12:21 AM Feature #14399: Add Enumerable#product
- Array#product would stomp on Enumerable#product, and it confusingly does a different thing:
~~~ ruby
[2,3,5,7].product => [[2], [3], [5], [7]]
~~~
Maybe Enumerable#multiply would compliment Enumerable#sum? -
04:40 PM Bug #14403: Crash and coredump (Stack consistency error) on ruby 2.5.0
- Oops, sorry, somehow missed reproduction script in the original report, here it is:
https://gist.github.com/jrochkind/a8344b1805badec8109b6f95c89a745b
```
require 'rexml/parsers/pullparser'
def look_at_record(parser)
# While... -
04:39 PM Bug #14403 (Closed): Crash and coredump (Stack consistency error) on ruby 2.5.0
- This reproduction script seems to make no sense, because it's extracted from an actual program where I encountered this bug, and trimmed down to be the minimal I can get to reproduce.
Parts of the script that seem irrelevant (like th... -
04:26 PM Feature #14383: Making prime_division in prime.rb Ruby 3 ready.
- Your `prime_division2` uses `OpenSSL::BN#prime?`. You may know, it is a Miller-Rabin *probabilistic* primality test which may cause a false positive. In short, I suspect that your code may (very rarely) return a wrong result. Am I rig...
-
02:31 PM Feature #14386: Add option to let Kernel.#system raise error instead of returning false
- Thanks, Takashi, but very often in my code, when dealing with output and error management of external commands, I end up wrapping them in a utility method of my own to properly handle errors and control flow anyway, so I'm not sure I'm i...
-
01:22 PM Revision d00ef6b3 (git): compile.c: check mid
- * compile.c (iseq_peephole_optimize): check that method ID is +@.
fix up r62039.
http://d.hatena.ne.jp/nagachika/20180125/ruby_trunk_changes_62025_62039#r62039
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62041 b2dd03c8-39d4-4d... -
01:13 PM Feature #14401 (Open): Integer#digitsの逆の動作をするメソッドが欲しい
- Integer#digitsの逆の動作をするメソッドがあると良いと思うのですがどうでしょうか?
~~~ruby
inverse_of_digits([5,4,3,2,1]) # => 12345
inverse_of_digits([1,0,1,1], 2) # => 13
inverse_of_digits(num.digits(base), base) == num #=> true
~~~
以下のようなケースで便利です
~~~ruby
... -
01:10 PM Bug #14388 (Closed): 不正エンコーディング文字列から切り出した正当なエンコーディング文字列が invalid encoding になる
- Applied in changeset trunk|r62040.
----------
string.c: clear substring code range
* string.c (str_substr): substring of broken code range string may
be valid or broken. patch by tommy (Masahiro Tomita) at
[ruby-dev:50430] [Bug #1... -
03:52 AM Bug #14388: 不正エンコーディング文字列から切り出した正当なエンコーディング文字列が invalid encoding になる
- Rubyの内部のコードにはあんまり詳しくないんですけど、これで直ると思うのですがどうでしょうか。
```diff
diff --git a/string.c b/string.c
index 82fa603ada..9079387fac 100644
--- a/string.c
+++ b/string.c
@@ -2560,6 +2560,7 @@ str_substr(VALUE str, long beg, long len, int empty... -
01:10 PM Revision 9237049e (git): string.c: clear substring code range
- * string.c (str_substr): substring of broken code range string may
be valid or broken. patch by tommy (Masahiro Tomita) at
[ruby-dev:50430] [Bug #14388].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62040 b2dd03c8-39d4-4d8f-98... -
12:31 PM Feature #13581: Syntax sugar for method reference
- @nobu Thanks, I've updated the list.
Can you please add it to next Developer Meeting's agenda?.. -
12:23 PM Feature #13581: Syntax sugar for method reference
- zverok (Victor Shepelev) wrote:
> * `map(&Math.>sqrt)`, `each(&.>puts)`
This conflicts with existing syntax.
> ...
Not this. -
12:23 PM Feature #14397: public, protected and private should return their arguments instead of self
- Would it be simpler for the semantics to always return an Array of symbols?
Otherwise `final` (and other potential uses) has to handle both a single Symbol and an Array of Symbol.
One concern is the extra allocations for the common c... -
12:00 PM Revision 845b3cfb (git): compile.c: unnecessary freezing
- * compile.c (iseq_peephole_optimize): get rid of freezing
dynamically created string to be duplicated immediately.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
11:34 AM Bug #14389: Reflected XSS
- TheGirdap (Hamit Cibo) wrote:
> hsbt (Hiroshi SHIBATA) wrote:
> ...
I see the message now "https://bugs.ruby-lang.org/issues/14389" ..
-
11:12 AM Bug #14389: Reflected XSS
- hsbt (Hiroshi SHIBATA) wrote:
> Thank you for your report.
> ...
gift ? -
01:46 AM Bug #14389 (Third Party's Issue): Reflected XSS
- Thank you for your report.
But I know that you already reported other places and shared the upstream information.
* https://github.com/ruby/www.ruby-lang.org/issues/1734
* https://github.com/ruby/www.ruby-lang.org/issues/1735
... -
11:21 AM Revision 07decad2 (git): openssl/buffering.rb: no RS when output
- * ext/openssl/lib/openssl/buffering.rb (do_write, puts): output
methods should not be affected by the input record separator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
10:28 AM Bug #14400 (Closed): IO#ungetc and IO#ungetbyte documentation is inconsistent with the behavior
- The documentation of IO#ungetc states:
> Pushes back one character (passed as a parameter) onto ios, such that a
> ...
And similar for IO#ungetbyte:
> Pushes back bytes (passed as a parameter) onto ios, such that a
> ...
The part... -
10:09 AM Feature #14240: warn four special variables: $; $, $/ $\
- I wonder that aliased variables also should be warned, `$-0`, `$-F`, and aliases in English.rb.
Currently, aliases of `$KCODE` are also warned.
In other words, the feature of `$KCODE` is warned (and has no effect now).
Should we w... -
10:00 AM Misc #14222: Mutex.lock is not safe inside signal handler: what is?
- normalperson (Eric Wong) wrote:
> > Having a not-well defined set of allowed operations in a Ruby block (the signal handler) seems a much larger problem worth fixing.
> ...
I think that would be very helpful and help to discuss possib... -
09:55 AM Bug #14375: 3 Spec failures building MinGW 2018-01-19 trunk 61950
- Thank you for the report and patches.
I decided to remove the specs trying arbitrary values for chmod/umask in r62036.
So much platform guards is usually a sign we are testing OS/libc-level stuff, which is not really the right thing ... -
09:50 AM Bug #14375 (Closed): 3 Spec failures building MinGW 2018-01-19 trunk 61950
- Applied in changeset trunk|r62036.
----------
Remove specs trying arbitrary values for chmod and umask
* Instead assert that too large values raise RangeError.
* [Bug #14375] [ruby-core:84933]
* See https://github.com/ruby/ruby/pull/1797 -
09:50 AM Revision b101d2c2 (git): Group related File.umask specs together
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
09:50 AM Revision 7dc0bdb6 (git): Remove specs trying arbitrary values for chmod and umask
- * Instead assert that too large values raise RangeError.
* [Bug #14375] [ruby-core:84933]
* See https://github.com/ruby/ruby/pull/1797
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
08:13 AM Feature #14392: Pipe operator
- Also when I want to look specifically at the API of a certain class I look into its documentation not the code base.
-
08:11 AM Feature #14392: Pipe operator
- shyouhei (Shyouhei Urabe) wrote:
> Don't you have difficulties writing elixir code then?
I mentioned already that Elixir it is there only as a reference.
I do not code Elixir.
> ...
The reason I think otherwise is this:
Whe... -
08:06 AM Feature #14392: Pipe operator
- Hanmac (Hans Mackowiak) wrote:
> Symbol#pri and others will never work
You're right. Not to much thought put on that one. It is not so easy as it seems from my comment but I wouldn't say never. When working with ruby "never" is a ... -
07:36 AM Feature #14392: Pipe operator
- dsferreira (Daniel Ferreira) wrote:
> shyouhei (Shyouhei Urabe) wrote:
> ...
To be clear I am not against specifying method visibility.
> Now, why do I require the visibility being set after the method definition?
> ...
Don't you h... -
07:35 AM Feature #14392: Pipe operator
- Symbol#pri and others will never work because you failed to understand how Object work in ruby
so NO "easily do by extending Symbol class"
----
there is also using them as modifier for the class scope
~~~ruby
class Foo
pr... -
07:25 AM Feature #14392: Pipe operator
- Shyouhei,
To add up to this:
When I look into a specific method my first concern is about the source code not its visibility.
Visibility information it is important but secondary when doing code analysis.
Why? Because I'm totally... -
07:07 AM Feature #14392: Pipe operator
- shyouhei (Shyouhei Urabe) wrote:
> Is it really worth adding a new syntax to replace private def... ?
For me it is Shyouhei.
Like I said before, I care a lot about the visibility of my methods.
The clear definition of each int... -
06:32 AM Feature #14392: Pipe operator
- I don't remember any programming language which puts the visibility of a method at the trailer of a method body. Is it really worth adding a new syntax to replace private def... ?
-
05:49 AM Feature #14392: Pipe operator
- mame (Yusuke Endoh) wrote:
> I'm now a bit against the feature
Yusuke what would you propose as an alternative?
Note that my main requirement behind this is to be able to use `private` after the method definition without the ne... -
02:09 AM Feature #14392: Pipe operator
- dsferreira (Daniel Ferreira) wrote:
>
> ...
Well... I was neutral to a pipe operator, but if people overuse (or even abuse) it like this, I'm now a bit against the feature. -
05:59 AM Feature #14371 (Rejected): New option "recursive: true" for Hash#transform_keys!
- I see. Thank you!
-
01:48 AM Revision 429e2abf (git): optparse.rb: literal newline
- * lib/optparse.rb (OptionParser#summarize): use literal newline to
join option summaries as IO#puts does, not the special gloval
variable $/.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
01:15 AM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- Hi Eric,
I've been reading this issue and I'm finding it fascinating.
Let me play here the role of the ruby developer that is seeking to
understand better the asynchronous ruby capabilities.
Every time I read threads(conversations)... -
12:42 AM Revision f8fa8dd9 (git): revert r62032 because it refers to a undefined variable
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
12:11 AM Bug #14246 (Closed): Inconsistent C source code indentation - Applied in changeset trunk|r62033.
----------
.editorconfig: Use spaces instead of tab except Makefiles
ref [Bug #14246]
[ci skip] -
12:11 AM Revision 224bbbdc (git): .editorconfig: Use spaces instead of tab except Makefiles
- ref [Bug #14246]
[ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
01/24/2018
-
11:30 PM Feature #14399 (Open): Add Enumerable#product
- For similar reasons for creating `Enumerable#sum` a companion method
`Enumerable#product` is also very useful. Taking the product of
numbers in arrays is a common operation in many numerical algorithms,
especially in number theory and... -
11:17 PM Revision 3010d5ee (git): optparse.rb: literal newline
- * lib/optparse.rb (OptionParser#summarize): use literal newline to
join option summaries as IO#puts does, not the special gloval
variable $/.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
10:41 PM Feature #14394: Class.descendants
- Thanks for the reply, shevegen, those are helpful questions :)
The gems I've seen implement this are active-support and dry-rb, with other people checking ObjectSpace to get the list (which can be very slow for large apps).
The mos... -
09:01 PM Feature #14394: Class.descendants
- I do not know if it was suggested before, but it could be discussed
at the ruby developer meeting perhaps (unless it was already rejected).
I think it may be symmetrical to .ancestors too.
To complete your suggestion, could you de... -
07:07 PM Feature #14394 (Assigned): Class.descendants
- There have been numerous implementations of the method Class.descendants by various gems. However, I can't help but think that this ability should be included in the Ruby language itself. Especially since Ruby already offers the counterp...
-
10:41 PM Bug #14398 (Closed): [BUG] Bus Error
- Hi Folks, not sure it this is appropriate place to send my bug.
I noticed this error when I tried to apply Puppet manifest https://github.com/kmonticolo/OpenBSD-owncloud-puppet/blob/master/site.pp on OpenBSD 6.2 machine using # puppet a... - 10:40 PM Revision 69d6e7d9 (git): vm.c: remove unnecessary branch
- th->altstack is never NULL, and even if it were, POSIX
stipulates free(3) on NULL to be a no-op.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 10:39 PM Revision 7c8b7975 (git): load.c: use fstring instead of OBJ_FREEZE
- These strings already exist (or will exist soon) in the fstring
table, so avoid the duplicate, sooner.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
09:41 PM Feature #14392: Pipe operator
- shevegen (Robert A. Heiler) wrote:
> No |> though.
Hi Robert, many thanks for the extensive comment.
The idea of using `"|>"` as the proposed pipe operator came from my analysis of https://bugs.ruby-lang.org/issues/13581 issue c... -
08:54 PM Feature #14392: Pipe operator
- > It will be reject anyways but I will still continue to seek
> ...
Who knows - but I think it may be too difficult to change it at
this point.
When it comes to personal preferences, what may work for you may
not work for others.
... -
04:24 PM Feature #14392: Pipe operator
- zverok (Victor Shepelev) wrote:
> That's the way, obviously.
Fortunately not every one look at things the same way, and I believe ruby core allows us to come in and discuss matters.
This is an important matter to me.
I know not m... -
04:10 PM Feature #14392: Pipe operator
- zverok (Victor Shepelev) wrote:
> It already looks messed up :)
Didn't understand very well how messed up it is.
Is that syntax impossible to implement or messed up just because the way ruby people tend to look at code syntax?
... -
03:16 PM Feature #14392: Pipe operator
- >> `private def bar(var)`
> ...
So, what you saying is "I don't like how the consistent set of features in language looks [it can't even be said to be "verbose", man!], so please introduce a new inconsistent feature for me to like it"... -
03:13 PM Feature #14392: Pipe operator
- Let me, then, introduce some philosphy here (I know this issue will be rejected anyways, so whatever).
When you propose new language feature, it is often useful to think a bit of it: how it plays with other features and general langua... -
02:59 PM Feature #14392: Pipe operator
- Hanmac (Hans Mackowiak) wrote:
> `private def bar(var)`
I don't like the syntax it provides.
What I do currently is:
```ruby
class Foo
def bar(var)
puts “Hello #{var}!”
end
private :bar
def baz(arg)
... -
02:54 PM Feature #14392: Pipe operator
- zverok (Victor Shepelev) wrote:
> We already have yield_self (2.5+) exactly for this.
I will not use it like that.
Not for the situations I presented.
To ugly and verbose. -
02:47 PM Feature #14392: Pipe operator
~~~ ruby
class Foo
private def bar(var)
puts “Hello #{var}!”
end
def baz(arg)
bar(arg)
end
end
~~~
method def already return their method name, so they can be used with private/protected
-
02:43 PM Feature #14392: Pipe operator
- We already have `yield_self` (2.5+) exactly for this.
```ruby
class Foo
##
# Bar public method.
def bar(*args)
args.select do { |arg| arg =~ /regex/ }.first
yield_self(&method(:good))
end.yield_self(&meth... -
02:35 PM Feature #14392 (Open): Pipe operator
- I would like to see implemented in ruby a pipe operator as we have in elixir.
An example of application I have in mind is this:
```ruby
class Foo
def bar(var)
puts “Hello #{var}!”
end |> private
def baz(arg)
... -
09:28 PM Feature #14396 (Rejected): public, protected and private should return their arguments instead of self
- 誤ってruby-devに投げてしまったのでこっちは閉じます。
[Feature #14397] を参照。 -
09:14 PM Feature #14396 (Rejected): public, protected and private should return their arguments instead of self
- Matsuda-san suggested me that `public`, `protected` and `private` should return their arguments instead of self,
to write such code:
```Ruby
require "finalist"
# see https://github.com/joker1007/finalist
class Foo
extend Fina... -
09:27 PM Feature #14397 (Assigned): public, protected and private should return their arguments instead of self
- Matsuda-san suggested me that `public`, `protected` and `private` should return their arguments instead of `self`,
to write such code:`
```Ruby
require "finalist"
# see https://github.com/joker1007/finalist
class Foo
extend F... -
09:13 PM Bug #14314: Marshalling broken in Ruby 2.5.0 for Structs with keyword_init: true
- The YAML issue has also been fixed on trunk.
-
09:07 PM Misc #14381 (Closed): [PATCH] ruby/ruby.h: remove unnecessary exports from C-API - Applied in changeset trunk|r62029.
----------
ruby/ruby.h: remove unnecessary exports from C-API
Needlessly exporting can reduce performance locally and increase
binary size.
Increasing the footprint of our C-API larger is also detrim... - 09:07 PM Revision 7e669f40 (git): ruby/ruby.h: remove unnecessary exports from C-API
- Needlessly exporting can reduce performance locally and increase
binary size.
Increasing the footprint of our C-API larger is also detrimental
to our development as it encourages tighter coupling with our
internals; making it harder for... -
08:58 PM Feature #14393: Support sending file descriptors (on local machine) via DRb UNIX
- Would be nice.
I must admit that I have not used drb in a really long time - but I
am a firm believer in ruby objects dwelling everywhere, and communicating
with them. :)
-
07:06 PM Feature #14393 (Open): Support sending file descriptors (on local machine) via DRb UNIX - Ruby: `2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]`
Currently DRb supports UNIX domain sockets, via `drbunix://`
UNIX sockets can transmit file descriptors via `send_io()`/`recv_io()` methods. Unfortunately DRb via `drbuni... -
08:52 PM Misc #14395 (Closed): [PATCH] internal.h: add BITFIELD macro
- Pretty trivial, will commit soon.
internal.h: add BITFIELD macro
I plan to use this macro to pack other enums in the VM while
preserving portability to non-C99 compilers.
* internal.h: add BITFIELD macro
* method.h: use BITF... - 08:50 PM Revision 0a0b71f3 (git): * 2018-01-25
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- 08:50 PM Revision a41386a2 (git): ruby.c (open_load_file): avoid shadowing variable for errno
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
05:49 PM Bug #14376: OpenSSL::X509::Store#verify_callback= requires Qtrue, not just truthy
- Please close in favor of #14377.
-
05:48 PM Feature #14377: Improve documentation for `OpenSSL::X509::Store#verify_callback=` and `OpenSSL::SSL::SSLContext#verify_callback=`
- Please close.
I need to learn to read docs. The fact that `Store#verify_callback=` is method (so listed in left pane) while `SSLContext#verify_callback=` is attribute (so NOT listed in left pane) completely got me. -
04:46 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- k0kubun (Takashi Kokubun) wrote:
> Vladimir, thank you for your opinion on this!
> ...
You are welcome. You are doing a great job.
> > --jit-wait/--jit-threshold are very useful options for testers. They should be used to test JIT ... -
04:42 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- > I also think that in the future setting JIT features and params through environment variable(s) might improve JIT usage experience too.
Ah, that's a topic that was discussed today too. I'm not going to have them at initial merge, bu... -
04:40 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- larskanis (Lars Kanis) wrote:
> I like your last proposal most (using `--jit-X` options). It would also allow this in the future:
> ...
I think 16 is too aggressive. It is not only worker threads (many of them will be in a wait state ... -
04:38 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- Vladimir, thank you for your opinion on this!
> --jit-wait/--jit-threshold are very useful options for testers. They should be used to test JIT on ruby tests (e.g. make check) because without them JIT practically has no time to compil... -
04:25 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- k0kubun (Takashi Kokubun) wrote:
> > The short form should be there for convenience IMHO
> ...
They look ok to me. I believe people at the developers meeting have the best experience with designing options for C-Ruby. I created origi... -
04:05 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- I like your last proposal most (using `--jit-X` options). It would also allow this in the future:
```
--jit [<threads>] use MJIT with the number of parallel workers (default: 16)
```
... or even the short form `-jX` .
-
03:44 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- > having "-jX" instead of "-j:t=X" would be very reasonable interface.
I rethought that it's still aggressive to add it while we have --jit-xxx too. Never mind about that part. -
03:41 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- > Vladimirs command line option -j:t=X sets the number of parallel running compile tasks, which is similar to what -j is typically used for.
Then using "-j" for non-parallel JIT-ing purpose may make it confusing. When JIT becomes stab... -
03:34 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- Vladimirs command line [option -j:t=X](https://github.com/vnmakarov/ruby/blob/rtl_mjit_branch/ruby.c#L267) sets the number of parallel running compile tasks, which is similar to what `-j` is typically used for. And it is therefore an int...
-
02:01 PM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- > The short form should be there for convenience IMHO
TBH I don't have strong preference on having the short versions or not. But I'm expecting that the only option normal user uses would be only "--jit" and others are basically for V... -
10:43 AM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- Just my opinion: -j only makes sense in the context of a tool/script which can run in parallel (build tool like make, package manager like bundler, etc).
For Ruby, a programming language interpreter, I think -j as --jobs would be meanin... -
05:09 AM Feature #14235: Merge MJIT infrastructure with conservative JIT compiler
- Before we merge MJIT, we need to consider what CLI options ruby should have.
Current implementation with some modification that I'll add:
~~~
-j, --jit use MJIT with default options
-j:option, --jit:option
... -
02:48 PM Feature #13581: Syntax sugar for method reference
- zverok (Victor Shepelev) wrote:
> map(&Math|>sqrt), each(&|>puts) (too confusable with Elixir-like pipe, probably)
I tend to agree with that.
In fact I was hoping to get the pipe operator introduced in ruby. (Created an issue wit... -
09:49 AM Feature #13581: Syntax sugar for method reference
- Just to push this forward, here are all the syntaxes from this and duplicate #12125.
I am taking `Math.sqrt` and `puts` as examples:
* `map(&Math->sqrt)` (and just `each(&->puts)` probably?) -- Matz is explicitly against it;
* `map(... -
02:31 PM Revision c5022061 (git): system_spec.rb: add RubySpec for r62025
- NEWS: added an entry for `exception: true` option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
02:15 PM Feature #14386 (Closed): Add option to let Kernel.#system raise error instead of returning false
- Applied in changeset r62025.
For rosenfeld's suggestion, open3 would be a good place to have the functionality. -
09:00 AM Feature #14386: Add option to let Kernel.#system raise error instead of returning false
- I created a patch for exception: true. https://github.com/ruby/ruby/pull/1795
-
07:14 AM Feature #14386: Add option to let Kernel.#system raise error instead of returning false
- Agree with adding keyword argument to specify raising an exception (`exception:true` sounds reasonable).
Matz.
-
07:11 AM Feature #14386: Add option to let Kernel.#system raise error instead of returning false
- I don't like the keyword name, "assert_status".
I think "exception" is better.
It is consistent with read_nonblock, etc. -
12:04 AM Feature #14386: Add option to let Kernel.#system raise error instead of returning false
- > I have nothing against it. I think it would change existing behaviour
though, if I read http://ruby-doc.org/core-2.5.0/Kernel.html#method-i-system
correctly
I don't get what you mean. Do you mean existing program may be passing :a... -
02:11 PM Revision fb29cffa (git): process.c: add :exception option to Kernel.#system
- to raise error when it fails.
[Feature 14386] [GH-1795]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:57 PM Bug #14391 (Closed): Integer#digitsが遅い
- Integer#digitsが遅い
大きなIntegerのdigitsがto_sと比べてかなり遅い(計算量のオーダーが違う)ようです。
~~~ ruby
(9999**9999).to_s.chars.map(&:to_i).reverse # 0.030225秒
(9999**9999).digits # 1.187126秒 (40倍)
(99999**99999).to_s.chars.map(&:to_i).reverse # 1.88821... -
12:30 PM Bug #14389: Reflected XSS
- shevegen (Robert A. Heiler) wrote:
> The twitter link above gives me "This account's Tweets are protected.", just
> ...
So what do I have to do? -
11:58 AM Bug #14389: Reflected XSS
- The twitter link above gives me "This account's Tweets are protected.", just
for your information. -
09:11 AM Bug #14389 (Third Party's Issue): Reflected XSS
- Hello,
Reflected Xss found ..
https://docs.ruby-lang.org/ja/search/query:import/query:callback/%22%3E%3C/title%3Ealert(XSS%20A%C3%A7%C4%B1%C4%9F%C4%B1)%3C/script%3E%3E%3Cmarquee%3E%3Ch1%3EXSSa%C3%A7%C4%B1%C4%9F%C4%B1%3C/h1%3E%3C/ma... -
12:18 PM Feature #14390: UnboundMethod#to_proc
- @shevegen I am well aware of the process, thanks. In my head, it also includes "ideas are discussed in this bug tracker, then they are added (or not) to next dev.meeting agenda." Do you have a suggestion of the shortcut way of adding it ...
-
11:55 AM Feature #14390: UnboundMethod#to_proc
- > Ugh, seems it duplicates answer-less #10879.
It can probably be referenced to the other report, and your issue
here closed (or the other one; I think it does not matter which
one).
Some issues are unanswered but this does not n... -
09:22 AM Feature #14390: UnboundMethod#to_proc
- Ugh, seems it duplicates answer-less #10879.
Though, I'd be happy to raise the priority of discussion higher, and to provide some real-life examples :) -
09:18 AM Feature #14390 (Feedback): UnboundMethod#to_proc
- I believe that it could be somewhat useful to have UnboundMethod converted to proc (accepting the object to bind to, as a first argument).
Practical(ish) example, paired with [Proc#rcurry](https://bugs.ruby-lang.org/issues/11161) prop... -
09:11 AM Feature #11161: Proc/Method#rcurry working like curry but in reverse order
- Started to write my own ticket, but found this one :)
My explanation was like this:
---
Considering two widespread Ruby patterns:
* Last method arguments are frequently options/settings/clarifications of the call;
* `Method#to... -
08:40 AM Feature #4830 (Rejected): Provide Default Variables for Array#each and other iterators
- Rejected. It would cause too much confusion than convenience.
Matz.
-
08:39 AM Feature #14371: New option "recursive: true" for Hash#transform_keys!
- FYI, ActiveSupport implemented these functionalities as separate methods:
* [Hash#deep_transform_keys](http://api.rubyonrails.org/classes/Hash.html#method-i-deep_transform_keys)
* [Hash#deep_transform_keys!](http://api.rubyonrails.or... -
06:19 AM Feature #14371: New option "recursive: true" for Hash#transform_keys!
- I don't think this proposal is a good idea for following reasons:
* `transform_keys` method to modify value part of `Hash`
* `recursive` option to change the behavior this much
* it is much harder to implement `transform_keys(recurs... -
08:36 AM Bug #4443: odd evaluation order in a multiple assignment
- 関連すると思われるささださんの昔のメールを見つけました: ruby-dev:31579
```
1) 右辺が重複しないローカル変数の列だったら今まで通り
(副作用はないので問題ない)
2) そうじゃなければ,色々コストをかけて順番通りに実行
ということにしたいと思います.多分,(1) がほとんどではないかと期待.
ネストした多重代入は (1) にはあてはまりませんが,まぁしょうがない.
``` -
08:25 AM Revision 7184e03e (git): mkmf.rb: werror on mswin
- * lib/mkmf.rb (MakeMakefile#try_ldflags): enable warning checking
on mswin, link.exe warns -l options but does not fail.
[Bug #13069]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
08:22 AM Feature #14240: warn four special variables: $; $, $/ $\
- We discussed this issue at today's developper meeting.
We (including matz) agree produce warnings for 5 variables ($; $, $/ $\ $.) when it is written in
ruby code except -e argument.
The warning is produced at compile time.
So th... -
08:14 AM Bug #14388 (Closed): 不正エンコーディング文字列から切り出した正当なエンコーディング文字列が invalid encoding になる
- ~~~ ruby
data = "\xFFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
p data.encoding #=> #<Encoding:UTF-8>
p data #=> "\xFFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
p data.valid_encoding? #=> false
data2 = da... -
08:11 AM Bug #14269: backport r61562, r61563, r61566, r61568, r61569 (fix SEGV touching uninitialized memory)
- ruby_2_5 r62023 merged revision(s) 61562,61563,61566,61568,61569.
-
08:11 AM Revision 9ceb9e30 (git): merge revision(s) 61562,61563,61566,61568,61569: [Backport #14269]
- fix SEGV touching uninitialized memory
This function can be called from boot_defclass().
No assumption can be made about object internals.
(lldb) run
Process 2386 launched: './miniruby' (x86_64)
... -
08:02 AM Bug #14380 (Assigned): Expected transform_keys! to work just as transform_keys, but it doesn't
-
08:00 AM Bug #14246: Inconsistent C source code indentation
- We discussed this issue in today's developer meeting.
- We agreed _not_ to batch update the indents at once. Indents should become consistent over time.
- Matz has no strong opinion on this topic.
- We agreed to move to spaces only... -
08:00 AM Feature #12732: An option to pass to `Integer`, `Float`, to return `nil` instead of raise an exception
- Just for the record, `Integer(x, rescue: default_value)` might be an idea, if anything other than `nil` (like zero) would be desired.
-
07:54 AM Feature #12732: An option to pass to `Integer`, `Float`, to return `nil` instead of raise an exception
- Aaron's comment in #note-6 sounds reasonable. Accepted.
Matz.
-
07:16 AM Feature #13969 (Closed): Dir#each_child
- Applied in changeset trunk|r62022.
----------
dir.c: Dir#each_child
* dir.c (dir_each_child_m): new instance methods Dir#each_child
and Dir#children. [Feature #13969] -
05:59 AM Feature #13969: Dir#each_child
- Agreed.
Matz.
-
07:15 AM Revision 6a3a7e91 (git): dir.c: Dir#each_child
- * dir.c (dir_each_child_m): new instance methods Dir#each_child
and Dir#children. [Feature #13969]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
06:32 AM Revision f7210deb (git): NEWS: [Feature #14223] [ci skip]
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
06:28 AM Feature #14313: Support creating KeyError with receiver and key from Ruby
- I agree with the original proposal. We are not going to enhance `raise` behavior (yet).
Matz.
-
06:25 AM Feature #14223 (Closed): Refinements で定義した #to_proc が &hoge 時に呼ばれないのを緩和する提案
- Applied in changeset trunk|r62020.
----------
vm_args.c: to_proc refinements
* vm_args.c (vm_to_proc): enable #to_proc by refinements at Proc
passing as a block. patched by osyo (manga osyo).
[Feature #14223] -
06:00 AM Feature #14223: Refinements で定義した #to_proc が &hoge 時に呼ばれないのを緩和する提案
- 良さそうに思えます。取り込んでみましょう。
Matz.
-
06:25 AM Revision a6e5073c (git): vm_args.c: to_proc refinements
- * vm_args.c (vm_to_proc): enable #to_proc by refinements at Proc
passing as a block. patched by osyo (manga osyo).
[Feature #14223]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
06:17 AM Feature #14382: Make public access of a private constant call const_missing
- matz (Yukihiro Matsumoto) wrote:
> The idea seems OK to me. Can you experiment?
With the attached patch, both test-all and test-spec pass.
The only time I can see this causing an issue is in a class/module that overrides `const_mi... -
05:35 AM Feature #14382: Make public access of a private constant call const_missing
- The idea seems OK to me. Can you experiment?
Matz.
-
03:33 AM Feature #14383: Making prime_division in prime.rb Ruby 3 ready.
- Well, I did say "serious" math, didn't I.
```
2.5.0 :097 > 2**256
=> 115792089237316195423570985008687907853269984665640564039457584007913129639936
2.5.0 :099 > n = 2**256 + 1; tm{ pp n.factors }
[[1238926361552897, ... -
12:34 AM Feature #14362: use BigDecimal instead of Float by default
- Rational and BigDecimal do not cover irrational numbers.
```ruby
require 'bigdecimal'
p (BigDecimal("2.0")**BigDecimal("0.5"))**BigDecimal("2.0")
#=> 0.19999999932878736e1
```
You'd need a mathematical solver, not a mere numeri... -
12:29 AM Bug #14387 (Closed): Ruby 2.5 を Alpine Linux で実行すると比較的浅めで SystemStackError 例外になる
- CircleCI で Alpine Linux を使って Ruby 2.5.0 で Rubocop を実行した時に遭遇した例外です(Ruby 2.4.3 では発生しませんでした)。
Ruby のバージョンによって、再帰が止められるまでの回数に大きな違いがあるのはなぜでしょうか?
これは、意図された挙動なのか、Ruby の変更によるものでは無く Alpine Linux 固有の問題なのか、教えていただく事は可能でしょうか?
Alpine Linux の Tr... -
12:12 AM Revision c786db20 (git): Fix a typo
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
12:03 AM Bug #14264 (Closed): RDoc comment of warn does not mention uplevel: - Applied in changeset trunk|r62018.
----------
Add documentation for the Kernel#warn :uplevel keyword
[ruby-core:84574] [Bug #14264]
Author: Jeremy Evans <code@jeremyevans.net> -
12:03 AM Revision 49a23c27 (git): Add documentation for the Kernel#warn :uplevel keyword
- [ruby-core:84574] [Bug #14264]
Author: Jeremy Evans <code@jeremyevans.net>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
01/23/2018
-
11:45 PM Feature #14383: Making prime_division in prime.rb Ruby 3 ready.
- Unless I copy-pasted wrong your `prime_division2` is /significantly/ slower for small numbers:
```
$ ruby bm.rb
prime_division - current in prime.rb
prime_division_2 - proposed version in #14383 by jzakiya
`factor` - sp... -
08:46 PM Feature #14383: Making prime_division in prime.rb Ruby 3 ready.
- The major problem with `prime_division` trying to accommodate negative numbers is
that, mathematically, [prime factorization](https://en.wikipedia.org/wiki/Integer_factorization) is really only considered over positive integers > 1.
I... -
07:16 AM Feature #14383: Making prime_division in prime.rb Ruby 3 ready.
- Currently, `prime_division` can factorize any negative integers that are less than -1 like:
```
[2] pry(main)> -12.prime_division
=> [[-1, 1], [2, 2], [3, 1]]
```
Do you think how to treat these cases?
I think raising Math::D... -
06:47 AM Feature #14383: Making prime_division in prime.rb Ruby 3 ready.
- I won't go into all points since your issue makes even my issue
requests seem small. :-)
It may be easier to split your suggestions into separate issues
though.
For example, the 0 and -1 situation, if it is a bug (probably
is bu... -
02:18 AM Feature #14383 (Closed): Making prime_division in prime.rb Ruby 3 ready.
- I have been running old code in Ruby 2.5.0 (released 2017.12.25) to check for
speed and compatibility. I still see the codebase in `prime.rb` hardly has
changed at all (except for replacing `Math.sqrt` with `Integer.sqrt`).
To achie... -
06:57 PM Feature #14386: Add option to let Kernel.#system raise error instead of returning false
- If an option would be used to make system raise instead of returning a boolean, then it would make more sense to return the combined err + out output instead of true or false. That could be quite useful and simpler to use than Open3's ca...
-
05:52 PM Feature #14386: Add option to let Kernel.#system raise error instead of returning false
- If I understood it correctly, you mean to pass in an optional hash
to be the second argument to system() right?
I have nothing against it. I think it would change existing behaviour
though, if I read http://ruby-doc.org/core-2.5.0/... -
05:39 PM Feature #14386 (Closed): Add option to let Kernel.#system raise error instead of returning false
- I sometimes write code like:
~~~ ruby
system('git pull origin master') || raise('Failed to execute: git pull origin master')
system('bundle check || bundle install') || raise('Failed to execute: bundle check || bundle install')
~~~... -
06:08 PM Feature #14385: Deprecate back-tick for Ruby 3.
- IMHO this is way too incompatible and using %x{} only makes it less nice/readable/intuitive.
What's wrong with the very convenient backtick notation ? -
05:11 PM Feature #14385: Deprecate back-tick for Ruby 3.
- nobu@ruby-lang.org wrote:
> Matz's intention is to use back-ticks for a different syntax,
> not to deprecate the command substitution feature.
I think that is dangerous to have the meaning of any syntax element
become something el... -
02:04 PM Feature #14385: Deprecate back-tick for Ruby 3.
- Hanmac (Hans Mackowiak) wrote:
> is there already any info for what this syntax (`) might be used for?
I haven't heard it. -
01:59 PM Feature #14385: Deprecate back-tick for Ruby 3.
- nobu (Nobuyoshi Nakada) wrote:
> `%x{}` will not change.
> ...
i am okay with that, imo %x is most cases still not the right for me
is there already any info for what this syntax (`) might be used for? -
01:46 PM Feature #14385: Deprecate back-tick for Ruby 3.
- `%x{}` will not change.
Matz's intention is to use back-ticks for a different syntax, not to deprecate the command substitution feature. -
11:55 AM Feature #14385: Deprecate back-tick for Ruby 3.
- would that affect `%x{}` too or whould that be done later?
i mean in most cases they might not what i want and need to use exec or popen -
11:52 AM Feature #14385: Deprecate back-tick for Ruby 3.
- Thank you for the early notice - there are now lots of entries for the developer meeting
compared to a few days ago. Looking forward to the (more important) results of the
meeting. :)
I agree with the summary. It would be nice if w... -
11:03 AM Feature #14385 (Rejected): Deprecate back-tick for Ruby 3.
- From https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20171212Japan#From-attendees
Matz hopes to deprecate backtick syntax(``) for Ruby 3. We should warn about it at Ruby 2.6 (or 2.7?)
We need to consider them.
* w... -
05:42 PM Feature #14362: use BigDecimal instead of Float by default
- nobu (Nobuyoshi Nakada) wrote:
> You can write "exact" number by `1.2r`.
Rational numbers work fine for `+`, `-`, `*` and `/` but once you encounter an irrational number, you'll have numerical errors again: ¯\\_(ツ)_/¯
```ruby
(2.... -
05:32 PM Feature #13618: [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- hsbt@ruby-lang.org wrote:
> We discussed your proposal at last developer meeting (Dec 26, 2017)
Awesome news.
> - Name this "Thread", or something Thread-ish word than Fiber-ish
So if we just use "Thread", then existing Thread... -
11:35 AM Feature #13618 (Assigned): [PATCH] auto fiber schedule for rb_wait_for_single_fd and rb_waitpid
- Hi, Eric.
We discussed your proposal at last developer meeting (Dec 26, 2017)
- Name this "Thread", or something Thread-ish word than Fiber-ish
- Matz doesn't have a strong opinion on the name but prefers 2 words (auto-fiber) than... -
04:37 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- It still doesn't make sense for me since it's only possible to add instance variables starting with @ when using the public exposed API, so it seems completely unnecessary to require the @ when using the public API, regardless of how the...
-
04:05 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- jeremyevans0 (Jeremy Evans) wrote:
> You can actually store instance variables that don't start with @ using the C-API
Thanks for the clarification. That makes perfect sense.
I suspected there would be some good explanation for th... -
03:41 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- dsferreira (Daniel Ferreira) wrote:
> I believe it would be great to have:
> ...
The reason this doesn't work is by design. You can actually store instance variables that don't start with @ using the C-API (rb_ivar_set), these are hid... -
03:30 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- nobu (Nobuyoshi Nakada) wrote:
> Do you want to access constants without the first upper case letter by const_get?
Would you like me to open an issue to discuss it? This String vs Symbol discussion is already to problematic in natu... -
03:25 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- `@` is a part of instance variable names.
Do you want to access constants without the first upper case letter by `const_get`?
```ruby
class X
Constant = 1
end
X.const_get(:onstant) #=> 1
``` -
03:15 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- nobu (Nobuyoshi Nakada) wrote:
> Instance variables must start with @ in ruby.
> ...
What I meant was what Rodrigo stated. (Thanks Rodrigo).
But that was just a side note. Maybe I'll open an issue to discuss that some day.
I bel... -
03:11 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- nobu (Nobuyoshi Nakada) wrote:
> Why and how do you think it will break that code?
Sorry Nobu. Now I can see it maps to the first example of the description. I misread it. So it will not break Hans example.
Not sure what will bre... -
02:55 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- > I ALREADY did! data for color gradient (see above). Just theating that my example doesn't exist to prof your point.
I was talking specifically about dealing with common cases, not exceptions. I told you that you'll find hashes using... -
02:52 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- > Instance variables must start with @ in ruby.
I believe that was exactly the point of Daniel. Since it must start with @, why having to include the @ while declaring the instance variable? Why not just the variable name? I also neve... -
02:48 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- dsferreira (Daniel Ferreira) wrote:
> Are you aware of the new keyword feature that will break that code?
> ...
Why and how do you think it will break that code?
dsferreira (Daniel Ferreira) wrote:
> Note: I don't understand why we... -
02:42 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- wouldn't this be beautiful:
```ruby
%w/height width tileheight tilewith/.each do |dimension|
instance_variable_set("@#{dimension}".to_sym, node[dimension])
end
```
Now imagine this:
```ruby
%w/height width tileheight til... -
02:34 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- Hanmac (Hans Mackowiak) wrote:
> and old (pre keyword) example how to make it work
I don't know what to think about that.
Isn't the all point of the discussion to find a solution that could allow us to handle those situations wit... -
02:20 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- dsferreira (Daniel Ferreira) wrote:
> Hans, now I completely missed your point.
> ...
and old (pre keyword) example how to make it work for all three user input (keys or strings), hash data from json or nodes from xml
i did some o... -
02:13 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- Hans, now I completely missed your point.
What does this prove?
```ruby
@height = (node[:height] || node["height"]).to_i
@width = (node[:width] || node["width"]).to_i
@tileheight = (node[:tileheight] || node["tileheight"]).to_i
... -
02:08 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- some older code of mine where i needed to handle both user input and input from xml or json
https://github.com/Hanmac/tmx-ruby/blob/master/lib/tiled_tmx/map.rb#L29-L34
that was before ruby got keyarguments
i know how to handle both
... -
01:44 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- It's not about what I think makes sense. I can provide you tons of code where people are using HWIA because it's a real problem Rubyists face every day some place around the globe. It's not hard to find too many examples on strings and s...
-
01:36 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- rosenfeld (Rodrigo Rosenfeld Rosas) wrote:
> > why are you guys not have a problem with that h[0] != h[0.0] ?
> ...
what if you have hash data for a color gradient?
then you have `{ 0 => 'start color', 0.5 => 'step color', 1.0 => 'end... -
12:34 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- > why are you guys not have a problem with that h[0] != h[0.0] ?
Aren't you exaggerating? When did you ever need to use a non integer number as a hash key? I never did and I never saw a single code base using non integer numeric value... -
12:15 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- rosenfeld (Rodrigo Rosenfeld Rosas) wrote:
> I give up on this discussion until someone brings a new perspective into it.
Rodrigo I'm working in a concrete proposal.
Matz statement that _"symbol is the fundamental part of the lan... -
12:07 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- rosenfeld (Rodrigo Rosenfeld Rosas) wrote:
> I give up on this discussion since I'm very low on free time these days and it's clear to me that I'm talking to the wind here, since most people discussing here seems to believe that "h[:a] ... -
11:58 AM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- I give up on this discussion since I'm very low on free time these days and it's clear to me that I'm talking to the wind here, since most people discussing here seems to believe that "h[:a] != h['a']" is a non issue and that it's always...
-
11:47 AM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- rosenfeld (Rodrigo Rosenfeld Rosas) wrote:
> > it means that the developer doesn't think about his own application enough to know if something would be a String or Symbol, or uses user input without checking which is even worse
> ...
i... -
10:55 AM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- > it means that the developer doesn't think about his own application enough to know if something would be a String or Symbol, or uses user input without checking which is even worse
It has nothing to do with the developer but with th... -
10:46 AM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- rosenfeld (Rodrigo Rosenfeld Rosas) wrote:
> But even if you had, that wouldn't completely fix the issue, because part of the application might use strings as keys while another part of the application might use symbols.
thats its... -
03:32 PM Bug #14384: CompatibilityError is thrown when formatting a non-ASCII string with a binary string argument
- The message does not come from `rb_w32_strerror` but `gai_strerror` in WinSock2 library.
-
03:31 PM Bug #14384 (Closed): CompatibilityError is thrown when formatting a non-ASCII string with a binary string argument
- Applied in changeset trunk|r62017.
----------
init.c: encode socket error message
* ext/socket/init.c (rsock_raise_socket_error): on Windows, encode
error messages from wide characters to the default encodings.
[ruby-core:84972] [B... -
02:50 AM Bug #14384 (Closed): CompatibilityError is thrown when formatting a non-ASCII string with a binary string argument
- The following script:
~~~
# coding: utf-8
require 'socket'
begin
TCPSocket.open('nowhere', 80)
rescue => e
puts "証明書をリクエストできませんでした: %s" % e.message
end
~~~
Produces an error on Windows instead of printing message:
~~... -
03:31 PM Revision a41005eb (git): init.c: encode socket error message
- * ext/socket/init.c (rsock_raise_socket_error): on Windows, encode
error messages from wide characters to the default encodings.
[ruby-core:84972] [Bug #14384]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62017 b2dd03c8-39d4-4d... - 03:31 PM Revision d6aa4916 (git): * 2018-01-24
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
03:31 PM Revision fb6c4ca1 (git): getaddrinfo.c: ai_errlist
- * ext/socket/getaddrinfo.c (ai_errlist): used only if gai_strerror
is missing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
02:17 PM Revision 813a206d (git): parse.y: fix yytokentype function declarations
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
02:02 PM Feature #5129: Create a core class "FileArray" and make "ARGF" its instance
- yimutang (Joey Zhou) wrote:
> For example, I want to mix two *groups* of files, not two files:
`FileGroup` ? -
12:09 PM Feature #5129: Create a core class "FileArray" and make "ARGF" its instance
- Just noticed it for the upcoming developer meeting. I agree with the
functionality; not sure if `FileArray` is a good name, but I also can
not suggest a better name. (The functionality is fine in my opinion) -
08:09 AM Feature #4831: Integer#prime_factors
- I am not against adding such an alias but I'd like to think with more inputs. At this moment, I don't have strong reason to justify the name.
From a certain perspective, the alias is simply wrong because the method returns not only pr... -
07:23 AM Bug #8402: Segfault when precompiling rails assets
- I has the same trouble with Ruby 2.2.8 and Rails 4.2.10.
After cleanup project's cache directory it working fine. -
03:53 AM Revision 502d0bab (git): parse.y: added implicit parser_params argument
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
03:37 AM Revision 8563942a (git): parse.y: added new_strterm wrapper
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
02:31 AM Revision 63c047f1 (git): parse.y: concat dedented heredoc
- * parse.y (heredoc_dedent): concat literal strings after dedented.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 02:23 AM Revision c16c30ac (git): * 2018-01-23
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
02:23 AM Revision 2bf8cac2 (git): parse.y: removed implicit parser_params macros
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
01:52 AM Feature #14370: Directly mark instruction operands and avoid mark_ary usage on rb_iseq_constant_body
- I've been doing more investigation about performance of this patch. Using the same Rails application I used for the initial graphs, I walked the heap for all instruction sequences and output the size of `iseq_encoded` along with the num...
01/22/2018
-
07:06 PM Feature #14336: Create new method String#symbol? and deprecate Symbol class
- Thanks, Matz, it certainly helps, but there are plenty of cases where we are not in the control of how hashes are serialized/deserialized. For example, when using Redis, the interface accepts a hash and it will serialize behind the scene...
-
02:41 PM Feature #14382: Make public access of a private constant call const_missing
- Eregon (Benoit Daloze) wrote:
> Isn't Module#deprecate_constant specifically for this usage?
`Module#deprecate_constant` deprecates all usage of the constant, both public and private. If you want to keep a constant but change the vi... -
01:12 PM Feature #14382: Make public access of a private constant call const_missing
- Isn't Module#deprecate_constant specifically for this usage?
-
03:50 AM Feature #14382 (Closed): Make public access of a private constant call const_missing
- Calling `obj.foo` where `foo` is a private method of `obj` calls `method_missing`. You would expect `klass::FOO` where `FOO` is a private constant of `klass` to call `const_missing`, but currently it doesn't. This makes a small change s...
-
01:09 PM Revision b8cc476c (git): use predefined IDs
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
12:37 PM Bug #13069: mkmf: ignore linker warnings on OpenBSD
- Could you let us know where those functions are used?
It's better to get rid of them, I think. -
12:34 PM Bug #13069 (Closed): mkmf: ignore linker warnings on OpenBSD
- Applied in changeset trunk|r62007.
----------
mkmf.rb: ignore linker warnings
* lib/mkmf.rb (try_ldflags): ignore linker warnings. they cause
unexpected failures on OpenBSD. [ruby-core:78827] [Bug #13069] -
10:24 AM Bug #13069: mkmf: ignore linker warnings on OpenBSD
- The issue is affecting my gem, [cld3-ruby](https://github.com/akihikodaki/cld3-ruby).
[Build failure on OpenBSD · Issue #16 · akihikodaki/cld3-ruby](https://github.com/akihikodaki/cld3-ruby/issues/16)
> Those warnings are always emit... -
12:34 PM Revision 4f03a239 (git): mkmf.rb: ignore linker warnings
- * lib/mkmf.rb (try_ldflags): ignore linker warnings. they cause
unexpected failures on OpenBSD. [ruby-core:78827] [Bug #13069]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
03:42 AM Bug #14380: Expected transform_keys! to work just as transform_keys, but it doesn't
- phluid61 (Matthew Kerwin) wrote:
> IIRC this was discussed when the feature was originally proposed.
Here you are. https://bugs.ruby-lang.org/issues/13583 - 03:04 AM Revision 218b8324 (git): time.c (num_exact): use predefined IDs
- No need to waste space on "to_r" and "to_int" which are
predefined in defs/id.def
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - 12:40 AM Revision 8a6c76b5 (git): time.c: constify compat_* tables
- compat_common_month_table and compat_leap_month_table should
not be writable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e -
12:27 AM Feature #7019 (Rejected): allow `private` and `protected` keywords to take blocks
- #3753 adds `private def ...` support. If you still want this feature, please reopen this issue.
-
12:22 AM Feature #8497 (Rejected): private, protected, private_constなどがブロックを受け取るようにする
- #3753 で`private def ...`と書けるようになって必要なくなったので閉じます。
01/21/2018
-
11:24 PM Bug #14380: Expected transform_keys! to work just as transform_keys, but it doesn't
- taw (Tomasz Wegrzanowski) wrote:
> Oops, I meant to suggest this, accidentally said "values" instead of "keys" :
> ...
IIRC this was discussed when the feature was originally proposed. What happens to a `break` inside the block? -
10:24 PM Bug #14380: Expected transform_keys! to work just as transform_keys, but it doesn't
- Oops, I meant to suggest this, accidentally said "values" instead of "keys" :
class Hash
def transform_keys!(&block)
replace transform_keys(&block)
end
end
-
05:18 PM Bug #14375: 3 Spec failures building MinGW 2018-01-19 trunk 61950
- Thanks for the report, I'll take a look.
This spec looks rather hacky at first sight. - 03:26 PM Revision 96240fa4 (git): * 2018-01-22
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
03:26 PM Revision c91b8a1b (git): parse.y: expand tokp macro
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
03:26 PM Revision 3cefccb6 (git): parse.y: add EXPR_NONE
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
02:28 PM Misc #14381: [PATCH] ruby/ruby.h: remove unnecessary exports from C-API
- Ack. Like I said I have no strong opinion on this.
-
01:21 PM Bug #14349: Fix Net::HTTP documentation around connection reuse
- Makes sense, I've attached a patch that fixes the documentation (generated from https://github.com/ruby/ruby/pull/1794).
-
09:59 AM Revision 415c3340 (git): keywords: shrink struct kwtable
- * defs/keywords (struct kwtable): shrink since members do not
exceed 16bit. lex_state needs to be int (or enum lex_state_e)
when EXPR_MAX_STATE reaches it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62001 b2dd03c8-39d4-4d8f-... -
07:44 AM Revision 543ed365 (git): parse.y: fix state after left brace
- * parse.y (parser_yylex): as well as `tLBRACE_ARG` (expr block),
`tLBRACE` (primary block) also does not accept a label. only
hash brace accepts a label.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62000 b2dd03c8-39d4-4d8f-98... -
07:44 AM Revision 3a12eb82 (git): parse.y: revert trace message to lex_state
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
07:44 AM Revision bb5772de (git): parse.y: use enum yytokentype
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
07:44 AM Revision 46e2fad6 (git): parse.y: parser_token_value_print for yydebug
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-
06:51 AM Feature #14378: Increase Fixnum range on Windows from 31 bits to 63 bits
- a mere data point:
(cygwin-64 ruby includes the full 64-bit Fixnum)
```
>> RUBY_VERSION
=> "2.2.5"
> ...
=> "x86_64 Cygwin\n"
>> (1<<61).class
=> Fixnum
> ...
=> Bignum
``` -
12:21 AM Feature #14378: Increase Fixnum range on Windows from 31 bits to 63 bits
- sxysxygm@gmail.com wrote:
>
> what I only want to say is 'why didn't use typedef?...'
In the 1980s, when the 'int' type was fluctuating between 16 bits and
32 bits, we learned to _NEVER_ trust naked C types.
This defensive tact... -
02:24 AM Revision f56a90ae (git): Fix missing m4_include at r61982
- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e