Activity
From 10/29/2019 to 11/04/2019
11/04/2019
-
11:45 PM Revision c7632fa8 (git): Do not occupy `ARGV` by XRUBY command
- Instead run test-bundled-gems.rb by `ENV['RUBY']`, which should be
set by runruby.rb. -
11:27 PM Revision ebbe396d (git): Use ident hash for top-level recursion check
- We track recursion in order to not infinite loop in ==, inspect, and
similar methods by keeping a thread-local 1 or 2 level hash. This allows
us to track when we have seen the same object (ex. using inspect) or
same pair of objects (ex. ... -
11:07 PM Revision 7c3bc0aa (git): Put an empty line [ci skip]
-
11:03 PM Revision 74bb8fb3 (git): More rdoc for ENV
-
09:49 PM Bug #16288: Segmentation fault with finalizers, threads
- ```
modified lib/timeout.rb
@@ -94,7 +94,7 @@ def timeout(sec, klass = nil, message = nil) #:yield: +sec+
ensure
if y
y.kill
- y.join # make sure y is dead.
+ # y.join # make sure y... -
05:11 PM Bug #16288: Segmentation fault with finalizers, threads
- mame (Yusuke Endoh) wrote:
> Thank you for the report and the great investigation! I could reproduce the issue by using your example: https://github.com/mainameiz/segfault_app
Thanks for checking in to it.
> ...
Yes, I think ther... -
09:35 PM Feature #15323: [PATCH] Proposal: Add Enumerable#filter_map
- Actually, after rereading what Jonathan wrote, he referred not to "true" values
per se, but as to whether "non nil values" are to be included. So perhaps I
misunderstood his comment. I think that filter still applies to the .select
an... -
09:32 PM Feature #15323: [PATCH] Proposal: Add Enumerable#filter_map
- Jonathan recently added this to the upcoming developer discussion (at https://bugs.ruby-lang.org/issues/16262),
in regards as to whether the current behaviour is correct, or whether it should include non-nil values as well.
The quest... -
09:35 PM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- > Ruby having a single nil, instead of JavaScript's null and undefined, is a net benefit, in my opinion.
undefined signals the absence of a value and makes possible composable default value design, where missing arguments can be forw... -
05:42 PM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- bughit (bug hit) wrote:
> The penalty the language pays is it has a demoware, checklist item, default value feature, where in any non-trivial scenario you have to produce the default value twice, first the intermediate default value thr... -
05:00 PM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- > The "penalty" I pay for this is one line of code
The penalty the language pays is it has a demoware, checklist item, default value feature, where in any non-trivial scenario you have to produce the default value twice, first the int... -
03:22 PM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- alanwu (Alan Wu) wrote:
> Since the beginning of time (correct me if I'm wrong), the two falsy values in Ruby has been `false` and `nil`, period.
> ...
I Agree. Not saying there's no benefit, but this is too big a change for too small ... -
10:24 AM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- The "penalty" I pay for this is one line of code like `period = Undefined.default(period, :day)`. Given this doesn't occur very often I don't see how "compiler support" would be beneficial.
-
09:13 PM Misc #16262: DevelopersMeeting20191128Japan
- * [Feature #15323] Enumerable#filter_map
* This feature has already been merged, but there may have been some confusion regarding the implementation.
* It currently selects only truthy values, but should it select all non-nil value... -
08:57 PM Feature #15899: String#before and String#after
- I use monkey-patched versions of these in many of my Ruby scripts. They have a few benefits vs. the alternatives:
* vs. `split` + `first` / `last`
* using `split` can cause an unintended result when the delimiter is not present, e... -
07:43 PM Misc #15843: Make "trunk" a symbolic-ref of "master" on git.ruby-lang.org
- Related to this change, would it be possible to redirect https://docs.ruby-lang.org/en/trunk/ to https://docs.ruby-lang.org/en/master/ ? There are links in various third-party docs and online articles which still point to https://docs.r...
-
07:25 PM Feature #16146: Array .difference allow custom comparison
- duerst (Martin Dürst) wrote:
> Well, that assumes that the block return values can be ordered. But it's easy to create cases where values can be compared for equality, but not ordered. Example: `[1, 'abc']`.
I'm not sure that I follo... -
05:51 PM Bug #16292 (Closed): Allow RDoc & YARD to find Encoding class doc's
- Documentation code (RDoc, YARD) cannot pick up the class comments for Encoding after the following commit:
https://github.com/ruby/ruby/commit/6546aed4757be07f4932326e1eb41a5d69141acf
A solution is to move lines 1919 thru 1924 above ... -
05:14 PM Revision 9d04fa71 (git): Updated minitest to 5.13.0
-
05:12 PM Revision c0c9a00f (git): Simplify test tasks
- Removed `if` conditions separating `test-bundled-gems`, and pass
`TESTOPTS` and `TEST_BUNDLED_GEMS_ALLOW_FAILURES` via `env`. -
05:05 PM Revision 929a4aa7 (git): Adjust a fucntion signature
-
04:58 PM Revision ec54261b (git): Fix zero free objects assertion
- This commit is to attempt fixing this error:
http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sky1/2353281
Each non-full heap_page struct contains a reference to the next page
that contains free slots. Compaction could fill any page, ... -
04:41 PM Feature #16289: Reduce duplicated warnings for the change of Ruby 3 keyword arguments
- > > If they only warn once, they are not that annoying, and people may be less inclined to fix the issue.
> ...
I think the issue is more that in a long-lived process you'll get only a few warnings in a large log, and it may be easy to ... -
04:32 PM Revision a087e027 (git): Fixed conditional expressions with only one void side
-
04:17 PM Feature #16153: eventually_frozen flag to gradually phase-in frozen strings
- Eregon (Benoit Daloze) wrote:
> For this discussion, I would focus on having this for Strings only initially.
Fair enough. I don't see much point in having this for objects other than strings. Focusing on strings might simplify the i... - 03:07 PM Revision bd3463ee (git): * 2019-11-05 [ci skip]
-
03:05 PM Revision 4e8336ba (git): Share test-bundled-gems-run in common.mk
-
02:37 PM Revision e91e3274 (git): Keep `lex.pcur` after `looking_at_eol_p`
-
02:31 PM Misc #16234: Enabling ARM 64/32-bit cases by Drone CI
- I like to share my investigation about below issue (random error) at "make install" on arm64 environment.
https://travis-ci.org/ruby/ruby/jobs/606916890#L2412
```
cp: cannot create regular file '../../.ext/common/json.rb': Permiss... -
02:17 PM Revision 26316cc3 (git): Warn `if` and `elsif` at EOL [EXPERIMENTAL]
- It is unnatural and probably a typo.
-
01:51 PM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- Is there a benefit to the change apart from consistency? A concrete benefit I mean.
-
01:45 PM Feature #16291 (Assigned): Introduce support for resize in rb_ary_freeze and prefer internal use of rb_ary_freeze and rb_str_freeze for String and Array types
- References Github PR https://github.com/ruby/ruby/pull/2640
### Why?
While working on https://github.com/ruby/ruby/pull/2037#issuecomment-548633141 I also looked at the `rb_ary_freeze` helper to determine if the same optimization o... -
01:27 PM Revision c303854e (git): Revert "Warn `if` and `elsif` at EOL [EXPERIMENTAL]"
- This reverts commit ba35c14325ebbf1da8f200df83c45ee9937ff8a1.
This is because ripper fails symbol lookup error. -
12:39 PM Revision ba35c143 (git): Warn `if` and `elsif` at EOL [EXPERIMENTAL]
- It is unnatural and probably a typo.
-
09:16 AM Feature #16290 (Closed): Add Ruby C API to acquire aligned memory
- Related to https://github.com/ruby/ruby/pull/2614
I have required to acquire aligned memory in Ruby C-extension library (https://github.com/rmagick/rmagick/pull/832).
I want an API that notifies acquired size to Ruby GC.
Of course... -
08:12 AM Revision cf377c55 (git): Fix a typo [ci skip]
-
07:38 AM Revision ffa92980 (git): Fixed a typo
-
12:40 AM Revision 823f25bb (git): sync_default_gems.rb: Show the progress at fetching
- It looks like hanging up when fetching from a remote first time.
-
12:28 AM Revision cbbdb4e5 (git): [ruby/racc] Strip trailing whitespaces at the last line of actions
- https://github.com/ruby/racc/commit/a887ebe529
- 12:18 AM Revision 046be65c (git): * 2019-11-04 [ci skip]
-
12:14 AM Revision df62d652 (git): Use the dedicated function `rb_io_check_io`
11/03/2019
-
06:57 PM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- > For this purpose I built a special value a while ago
What purpose? Surely you understand that your special value, having no compiler support, does not trigger default value computations.
You are making my point. Your Undefined is... -
04:58 PM Feature #16153: eventually_frozen flag to gradually phase-in frozen strings
- For this discussion, I would focus on having this for Strings only initially.
I don't think it's about the "grand design of immutability", but rather a tool to ease migration towards frozen Strings for some APIs.
My main concern abou... -
04:52 PM Feature #16153: eventually_frozen flag to gradually phase-in frozen strings
- Dan0042 (Daniel DeLorme) wrote:
> Since returning a frozen string from Symbol#to_s [was reverted](https://bugs.ruby-lang.org/issues/16150#change-82420), it looks like this proposal is still relevant.
It's not reverted (yet at least). -
02:20 PM Revision 5a7487bd (git): Added assertions for linebreak
-
02:18 PM Revision 7b2cd548 (git): [DOC] mentioned `\R` [ci skip]
-
01:53 PM Revision f8b3d7d1 (git): [DOC] \s in regexp is not same as in string [ci skip]
-
10:31 AM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- shugo (Shugo Maeda) wrote:
> Code like `/regex/ =~ str` has often been used when `str` may be `nil`, and such code has been rewritten using Regexp#match? after Ruby 2.4.
> ...
That's a good point.
We can still discuss on this ticket w... -
10:18 AM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- kachick (Kenichi Kamiya) wrote:
> How about https://github.com/ruby/ruby/pull/2637?
I merged that PR, thank you.
Regexp#{match,match?} with a nil argument now just warns.
The plan is then to make them raise TypeError in Ruby 3.0. -
12:35 AM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- matz (Yukihiro Matsumoto) wrote:
> Thank you for the input. If you can provide a more detailed situation, it would be better.
My situation is the same as Rafael's, and I fixed my code using the safe navigation operator:
https://... -
10:25 AM Revision 782d1b8f (git): Fix warnings in Regexp#{match,match?} specs
-
10:14 AM Revision fbacfe68 (git): Update NEWS entry for Feature #13083
-
10:14 AM Revision 4a166237 (git): Remove incorrect NEWS entry, only Regexp#match and #match? changed
- 10:03 AM Revision 985e6ced (git): * 2019-11-03 [ci skip]
-
10:03 AM Revision 31110d82 (git): Improve warning message
- https://github.com/ruby/ruby/pull/2637#discussion_r341812475
-
10:03 AM Revision 452bee3e (git): Revert nil error and adding deprecation message
11/02/2019
-
03:47 PM Feature #16289: Reduce duplicated warnings for the change of Ruby 3 keyword arguments
- > If they only warn once, they are not that annoying, and people may be less inclined to fix the issue.
It's a warning about an upcoming incompatibility, once should be serious enough!
Maybe it should be reworded to emphasize serio... -
12:56 PM Feature #16289: Reduce duplicated warnings for the change of Ruby 3 keyword arguments
- What's the performance with this patch for a call site that would warn?
```
$ chruby ruby-2.7.0-preview2
$ ruby -rbenchmark/ips -e 'def m(**kw); end; h = {a: 1}; Benchmark.ips { |x| x.report { m(h) } }'
... many warnings ...
... -
08:00 AM Feature #16289: Reduce duplicated warnings for the change of Ruby 3 keyword arguments
- What I worry about is Jeremy's comment in the PR:
> In terms of idea, whether we want this feature depends on how annoying we want the warnings to be. If they warn every call, they are very annoying and it will push people to fixing t... -
01:14 PM Feature #16150: Add a way to request a frozen string from to_s
- The plan is Rails 6 users can update to Rails 6.0.1 and Rails 5.2 users can update to Rails 5.2.4 (assuming 5.2.4 will be released before 2.7, we need to confirm with Rails devs).
That should be easy and recommended for security and oth... -
10:06 AM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- For this purpose I built a [special value](https://github.com/dry-rb/dry-core/blob/99e4035148af729298430aefe85b4c93cb318195/lib/dry/core/constants.rb#L41) a while ago. It has been working fine all this time. I don't think there's a need ...
-
12:32 AM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- Since the beginning of time (correct me if I'm wrong), the two falsy values in Ruby has been `false` and `nil`, period.
Adding another falsy value is a big change.
> the missing/undefined second arg to f3 invocation flows all the way... -
06:32 AM Revision 772b0613 (git): Correct documented return values for certain ENV methods (#2620)
-
01:22 AM Bug #16288: Segmentation fault with finalizers, threads
- Thank you for the report and the great investigation! I could reproduce the issue by using your example: https://github.com/mainameiz/segfault_app
Currently, starting a thread in a finalizer is dangerous. The termination of the inte...
11/01/2019
-
11:55 PM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- It's conceivable that it can be done without a keyword, there are other way to refer to special values.
However what do you have against a null coalescing operator? It's needed regardless of this issue, || and ||= are inadequate becau... -
09:55 PM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- bughit (bug hit) wrote:
> The value would be `missing`. Adding something like `missing` to the language would need to be coupled with a null coalescing operator which would cover both nil and missing (but not false). Something like `??`... -
09:33 PM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- > Other than arity, it seems like you would want to use the new argument forwarding syntax
I didn't know about new syntax, is that in 2.7? However, I don't think that's general enough. In javascript you can forward individual argument... -
07:21 PM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- Other than arity, it seems like you would want to use the new argument forwarding syntax:
```ruby
def foo(default1 = some_expression)
end
def bar(...)
foo(...)
end
def foobar(...)
bar(...)
end
```
The major issue ... -
07:02 PM Feature #11660: a falsy value (similar to js undefined) that facilitates forwarding of default arguments
- Compared to javascript default arg values are far less useful in ruby because of the lack of this forwarding capability.
This issue is 4 years old, can ruby core at least consider this? -
11:37 PM Feature #16150: Add a way to request a frozen string from to_s
- This issue is also fixed on Rails 5.2 and will be released in the next version of Rails.
Users of any version of Rails below 5.2 are already abandoned. The Rails core team don't support those versions anymore. So, they already need to... -
11:16 PM Feature #16150: Add a way to request a frozen string from to_s
- >So if that issue is caused by Rails, it should be fixed before any stable release of Ruby 2.7 comes out.
This change affects many developers, company and applications with upgrading work. How about Rails 5.2 and 5.1 users? Do we aban... -
05:56 PM Feature #16150: Add a way to request a frozen string from to_s
- @rafaelfranca told me Rails 6.0.1 is scheduled for November 5, way before the Ruby 2.7 release (see https://weblog.rubyonrails.org/2019/10/31/Rails-6-0-1-rc1-released/).
So if that issue is caused by Rails, it should be fixed before any... -
05:43 PM Feature #16150: Add a way to request a frozen string from to_s
- hsbt (Hiroshi SHIBATA) wrote:
> This change must be reverted.
I don't think it's fair to decide that on your own, from apparently just one issue.
Could you detail the situation, i.e., in which place the problem occurs and why can'... -
08:54 AM Feature #16150: Add a way to request a frozen string from to_s
- OK, frozen `Symbol#to_s` should be reverted. Maybe we can challenge in the future (with the deprecation process first).
Matz.
-
12:55 AM Feature #16150: Add a way to request a frozen string from to_s
- This change must be reverted.
I got the issue report from Heroku users.
https://github.com/heroku/heroku-buildpack-ruby/issues/833#issuecomment-548592514
When Rails 6.0.0 and old version users specified Ruby 2.7, Their applicati... -
07:20 PM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- How about https://github.com/ruby/ruby/pull/2637?
-
06:02 PM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- I think everyone agrees this is too breaking (just look at how many call sites need to be changed in Rails and other gems),
and it's very easy to deprecate the old behavior by warning when passing `nil` in Ruby 2.7.
The only question... -
04:05 PM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- The detailed situation.
Rails and other libraries and codebases rely on `/regex/.match?(nil)` to return false. This change is making that method to raise an error in that situation.
Changing this behavior on Ruby 2.7 means that app... -
08:51 AM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- Thank you for the input. If you can provide a more detailed situation, it would be better.
Matz.
-
03:44 AM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- +1 for deprecation too. My text editor had been broken by this change, and Vim was needed to fix it.
-
02:46 AM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- +1 for deprecation. The removal is too harsh.
-
02:41 AM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- I am 100% with Rafael here, this is a very risky change, Rails and Sprockets are only a couple of projects, there will be tons of stuff that will not be caught.
Why not deprecate this for now and then next release it can be removed? -
04:14 PM Bug #16288: Segmentation fault with finalizers, threads
- A little bit more data:
I added some more debugging statements, and I found that the main thread goes from being marked with the THREAD_KILLED status to THREAD_STOPPED_FOREVER
This appears to happen in thread_join_sleep in thread.c... -
03:50 PM Bug #16286 (Closed): DateTime.parse timezone errors
- 03:15 PM Revision e6f0fd8a (git): * 2019-11-02 [ci skip]
-
03:11 PM Revision ea979336 (git): Use prompt_list to calculate height by lines
-
01:56 PM Feature #16153: eventually_frozen flag to gradually phase-in frozen strings
- Since returning a frozen string from Symbol#to_s [was reverted](https://bugs.ruby-lang.org/issues/16150#change-82420), it looks like this proposal is still relevant.
Is it realistic to wish for this in 2.7? The sooner the better imho. -
01:26 PM Feature #16289: Reduce duplicated warnings for the change of Ruby 3 keyword arguments
- > It leads a memory leak.
Theoretically, yes. Even if iseqs of caller or callee are free'd, the corresponding records are not free'd. But honestly I don't think it is worth elaborating the feature for some reasons:
(1) in practic... -
07:03 AM Feature #16289: Reduce duplicated warnings for the change of Ruby 3 keyword arguments
- It leads a memory leak.
And different warnings won't be suppressed too? -
04:38 AM Feature #16289: Reduce duplicated warnings for the change of Ruby 3 keyword arguments
- Definite +1 for me. I thought there was already an issue about this but looks I was mistaken.
-
03:29 AM Feature #16289 (Closed): Reduce duplicated warnings for the change of Ruby 3 keyword arguments
- ## Problem
Currently, the interpreter emits 200 lines of warnings against the following program.
```ruby
def foo(**opt); end
100.times { foo({kw:1}) }
```
```
$ ./miniruby -e 'def foo(**opt); end; 100.times { foo({kw:1}) }'
... - 09:40 AM Revision 10c2a085 (git): Clean up implementation of SOCKSSocket, its confusing and undocumented
- 09:39 AM Revision 68e0bfcd (git): Prefer libsocksd over libsocks
- 09:39 AM Revision b8004103 (git): Support libsocksd socks library for SOCKSSocket
-
09:37 AM Revision c56d8dea (git): Mention correct class name in uninitialized error
- I think this meant to mention `MatchData`? This is a breaking change, but
should be a minor one. -
09:33 AM Revision cc8116b0 (git): Fix a typo [ci skip]
-
08:30 AM Revision 6abf4c48 (git): [ruby/date] Added update-zonetab target
- https://github.com/ruby/date/commit/9bc6e30a82
-
08:30 AM Revision b2126d3f (git): [ruby/date] Remove unneeded line in update-abbr
- https://github.com/ruby/date/commit/ae14e5f293
-
08:30 AM Revision 46954530 (git): [ruby/date] Add more timezone abbreviations
- This gets the time zone abbreviations from
https://www.timeanddate.com/time/zones/, and adds unambiguous time
zones not already present in zonetab.list. See bin/update-abbr
for the program used.
This regenerates zonetab.h using prereq.... - 07:59 AM Revision 51825c04 (git): * 2019-11-01 [ci skip]
-
07:58 AM Revision 72f997ed (git): mark functions that do not return NULL as such.
- Apply __attribute__((__returns_nonnull__)) when available.
-
07:58 AM Revision f5e40632 (git): ruby_mimmalloc can return NULL
- malloc can fail. Should treat such situations.
-
07:58 AM Revision fb495b29 (git): rb_aligned_malloc can return NULL
- Looking at gc.c, rb_aligned_malloc contains `return NULL;` so it
has to be taken care of. Note however that posix_memalign(3posix)
does _not_ set errno. -
07:58 AM Revision 2c889e9b (git): RUBY_ATTR_ALOC_SIZE for clang
- clang also supports __attribute__((__alloc_size__)) so why not use
it when the compiler says it does. -
02:42 AM Feature #16276: For consideration: "private do...end" / "protected do...end"
- I can think of other cursed usages of private taking a block.
```ruby
class Foo
Bar = proc do
Baz = 1
def foo
Baz
end
end
end
class Bar
private(&Foo::Bar)
end
```
Should what happen?
- Possi... -
01:54 AM Feature #16276: For consideration: "private do...end" / "protected do...end"
- Oh! Looks like I missed that part of the proposal! Now the `def o.hello; end` question makes a lot more sense. Sorry, Alan.
If we break this down a bit, this proposal can potentially set the visibility (within the block) for
1. ins...
10/31/2019
-
11:02 PM Bug #16288 (Closed): Segmentation fault with finalizers, threads
- Hi,
This is a tricky one and I am still working on narrowing it down, but I will report what I have so far.
I compiled a version of 2_6_6 from github: ruby 2.6.6p116 (2019-10-02 revision 67825) [x86_64-linux]
I have a minimal Ra... -
10:37 PM Feature #13083: Regexp#{match,match?} with a nil argument are deprecated and will raise a TypeError in Ruby 3.0
- I know this change is to make the code consistent but this is a backward incompatible change and I don't think it should be applied to Ruby 2.7 without deprecation. The fact that we need to change Rails and many other gems to make this w...
-
07:30 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- The extra complication comes from this part of the original proposal:
```ruby
private do
def self.some_private_class_method
puts "I'm also private - principle of least surprise"
end
end
```
This is different from the no... -
07:11 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- > There is no problem with fibers/threads currently, because the visibility is stored in the scope (not in the class itself). You stated `When the private method toggles the visibility state of the current class/module`, implying this w...
-
06:08 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- Dan0042 (Daniel DeLorme) wrote:
> Ok, but how is this different from the regular syntax? The exact same issue applies to this:
> ...
Are you sure? You can test this by using queues to synchronize:
```ruby
class A
end
Q1 = Queu... -
05:43 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- Ok, but how is this different from the regular syntax? The exact same issue applies to this:
```ruby
class A
end
Thread.new do
class A
def pub; end
end
end
class A
private
def priv; end
end
```
If there'... -
03:10 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- Dan0042 (Daniel DeLorme) wrote:
> Also I'd like to ask how fibers are relevant to this? When the `private` method toggles the visibility state of the current class/module, does that have anything to do with fibers?
```ruby
class A
... -
01:35 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- I don't see why all the opposition to this. It's a very simple, very intuitive and clear syntax. It fits well with the rest of ruby and the usage of blocks in general.
alanwu (Alan Wu) wrote:
> ```ruby
> ...
I think @adh1003 was pr... -
05:27 AM Feature #16276: For consideration: "private do...end" / "protected do...end"
- adh1003 (Andrew Hodgkinson) wrote:
> duerst (Martin Dürst) wrote:
> ...
I'm not advocating any particular coding style. There are many coding styles that make it clear that `private` applies to a range of methods. There are not many ... -
05:03 AM Feature #16276: For consideration: "private do...end" / "protected do...end"
- I have no strong opinion against this issue. In #7019, I just said that it was too late to introduce the feature into Ruby 2.0 because I was the release manager for 2.0.
I'm curious about Rails developers' opinion. I hear that they ... -
07:03 PM Bug #16286: DateTime.parse timezone errors
- shyouhei (Shyouhei Urabe) wrote:
> Curious where were those abbreviation from. According to `git log -G`, It was introduced in this commit https://github.com/ruby/ruby/commit/dc9cd6a8c22ad04baa7498fd0cbc5d519ed73be0 but no description ... -
02:25 AM Bug #16286: DateTime.parse timezone errors
- Curious where were those abbreviation from. According to `git log -G`, It was introduced in this commit https://github.com/ruby/ruby/commit/dc9cd6a8c22ad04baa7498fd0cbc5d519ed73be0 but no description came with it.
Maybe it's better t... -
12:46 AM Bug #16286 (Closed): DateTime.parse timezone errors
- Trying to parse a DateTime using Australian time zone abbreviations doesn't work:
```
>> DateTime.parse('2019-10-31 10:49:52.36400 AEST')
=> #<DateTime: 2019-10-31T10:49:52+00:00 ((2458788j,38992s,364000000n),+0s,2299161j)>
# offse... -
07:02 PM Feature #10911: IPAddr.new should ignore zone identifiers
- Dan0042 (Daniel DeLorme) wrote:
> So "fe80::1%fxp0" is not even recognized as an IP address. This could result in unpleasantness in cases like this:
> ...
Good point. We would probably want to fix socket to support this before adding ... -
06:37 PM Feature #10911: IPAddr.new should ignore zone identifiers
- Looks like this testcase was in the original IPAddr commit from 2002:
```
commit 9ec0a96ad4235f2054976eab6c04efbe62b3c703
Author: knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Mon Dec 23 17:07:49 2002 +0000
* MANIFEST... -
04:23 PM Feature #10911: IPAddr.new should ignore zone identifiers
- I don't think this is a bug. The decision to not support zone identifiers seems deliberate as there are tests that using a zone identifier raises an exception:
```ruby
assert_raise(IPAddr::InvalidAddressError) { IPAddr.new("fe80::1%... -
05:38 PM Bug #16285 (Closed): Setting mtime to zero on Zlib::GzipWriter does nothing
-
05:12 PM Bug #14119: IPAddr#include? does not seem to support the subnet mask
- I'm not sure this is a bug, but it certainly seems like a bug to me. `IPAddr#include?` must consider the netmask of the receiver in order to work, for it not to consider the netmask of the argument seems wrong.
Attached is a patch th... -
04:51 PM Bug #11531: IPAddr#== implements wrong logic
- I am not sure whether this is a bug. `eql?` considers the netmask, but `==` does not. So if you want to consider the netmask, you can currently use `eql?`. Changing `==` to be the same as `eql?` could cause backwards compatibility issue...
-
01:47 PM Feature #16287: Proposal to add .second and .third in particular to class Array
- If I need such repeating accesses, I'll use `values_at` instead.
Probably, the word `first` is misleading.
If it were `head` or `lead`, the meaning would be clear.
-
12:23 PM Feature #16287 (Open): Proposal to add .second and .third in particular to class Array
- I meant to suggest this earlier, but then I think I did not; if I actually did, then please excuse my forgetfulness and
close the issue request here. I am very unorganized (also in reallife).
Anyway - I will be as short as possible h... -
01:24 PM Revision 63f70eb6 (git): [ruby/zlib] Removed no longer used variables
- https://github.com/ruby/zlib/commit/3e98e4cac3
-
01:23 PM Revision 0aaa15f6 (git): [ruby/zlib] Fix setting mtime to zero in GzipWriter
- Before this change, it was not possible to write out zero for the
timestamp part of a Gzip file's header, as calling GzipWriter#mtime with
zero was ignored.
Judging from the docs for `GzipWriter#mtime=`, it should be possible to
indicat... -
09:33 AM Bug #16284: Net/HTTP consuming multiple times more memory compared to other libraries
- Hey Yusuke, thanks for checking this out. I have tried this out on my friends machines and one of them has exactly the same results as I, but other has the results that are matching yours. All three of us are using MacBooks (although dif...
-
08:55 AM Bug #16281 (Closed): `irb -w` issues warning
- This is fixed by commit:d6ed7a984c8fd991ce2614d2f228239f8eb490b5. Thank you for reporting and patch!
-
08:51 AM Revision d6ed7a98 (git): Fix verbose warning being emitted
- Fixes Ruby Bug 16281.
-
08:11 AM Revision 5f6fbf87 (git): spec: Fix syntax errors
- Follow up of 473882e01f7e55753733e2607ace633b5041f11f
-
07:50 AM Revision 473882e0 (git): Skip tainted examples for stringio
-
07:24 AM Revision ebc88446 (git): [ruby/stringio] Remove taint support
- Ruby 2.7 deprecates taint and it no longer has an effect.
The lack of taint support should not cause a problem in
previous Ruby versions.
https://github.com/ruby/stringio/commit/60ee9ccd95 -
06:51 AM Revision 3895e548 (git): [ruby/date] Revert "Simplify #inspect"
- This reverts commit af01edd7d8575f544f647dbe8cde5b6ae535d459.
Revert requested by Yui Naruse.
https://github.com/ruby/date/commit/875d563557 - 06:51 AM Revision fce940aa (git): [ruby/date] introduce Date::Error, raise Date::Error for every
- "invalid <anything>" type of exception
https://github.com/ruby/date/commit/3e55c09ba4 -
06:41 AM Revision e4cd0d72 (git): [ruby/fileutils] Remove use of untaint on Ruby 2.7 to avoid deprecation warnings
- https://github.com/ruby/fileutils/commit/5ac9a8a1f7
-
06:34 AM Revision 39281d57 (git): [ruby/gdbm] Use Gemfile instead of Gem::Specification#add_development_dependency.
- https://github.com/ruby/gdbm/commit/bd2e7f6647
-
06:34 AM Revision b93ab7d6 (git): [ruby/gdbm] Remove taint support
- Ruby 2.7 deprecates taint and it no longer has an effect.
The lack of taint support should not cause a problem in
previous Ruby versions.
https://github.com/ruby/gdbm/commit/f9aaa1a08d -
06:34 AM Revision 290903db (git): [ruby/zlib] Remove taint support
- Ruby 2.7 deprecates taint and it no longer has an effect.
The lack of taint support should not cause a problem in
previous Ruby versions.
https://github.com/ruby/zlib/commit/21711ed0ce -
06:29 AM Feature #16272 (Closed): Update Unicode Emoji version to 12.1
- It turned out that for Ruby, the only thing that changed was that there are some more tests.
Implemented with https://github.com/ruby/ruby/commit/c54635c08b, NEWS updated with https://github.com/ruby/ruby/commit/bc7fbb6f02. -
06:19 AM Revision bc7fbb6f (git): Mention update to Unicode Emoji version 12.1 in NEWS.
- Also fixed some grammatical errors. [ci skip]
-
06:14 AM Misc #15843: Make "trunk" a symbolic-ref of "master" on git.ruby-lang.org
- For people who haven't yet switched from trunk to master, when you push, you'll get a message saying:
```
remote: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
remote: @ WARNING: THE TRUNK BRANCH OF RUBY.GIT IS DEPRE... -
04:23 AM Feature #6362: Modular exponentiation/inverse
- FYI:
* Modular exponentiation is implemented in Ruby 2.5 . https://ruby-doc.org/core/Integer.html#method-i-pow
* I created a patch gem to calculate a usual/modular multiplicative inverse. https://www.rubydoc.info/gems/numeric_inver... -
01:19 AM Revision c38ba757 (git): Fixed the sync task for json
- * Ignode to change ext/json/depend
* Fixed to ignore json_pure files -
01:05 AM Revision 79d96b42 (git): Revert "Fix zero free objects assertion"
- This reverts commit e1bf29314feee6aaf535917da0178e868e7ff3fa.
I'm not sure why this broke stuff, I need to investigate later. -
12:28 AM Revision e1bf2931 (git): Fix zero free objects assertion
- This commit is to attempt fixing this error:
http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sky1/2353281
Each non-full heap_page struct contains a reference to the next page
that contains free slots. Compaction could fill any page, ...
10/30/2019
-
11:39 PM Revision e08f2e47 (git): Also ignore mswin platform
-
11:39 PM Revision 8540efd3 (git): Ignore test_racc_command with linux platform
-
11:39 PM Revision 1c03026e (git): Try to run assert_output_unchanged with racc tests
-
11:11 PM Feature #16275: Revert `.:` syntax
- `.:` has special power in that one cannot change its semantics by redefining a
method. It other words, it's a fundamental operation in the language like
`class << object` and `def object.method_name; end`. I think a fundamental
operat... -
09:14 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- For the following:
```ruby
class Foo
private do
o = Object.new
def o.hello; end
end
end
```
Would `o.hello` be private? Also, I assume you want the visibility change to
be fiber local, to follow the principle of lea... -
08:04 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- adh1003 (Andrew Hodgkinson) wrote:
> There seems to be a general agreement that this proposed extension would be a good thing
I'm not seeing general agreement that this would be a good thing to add. In this ticket:
@shevegen : mo... -
07:08 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- shyouhei (Shyouhei Urabe) wrote:
> Yes, I agree we don't copy C++ / Java. What I wonder is _any_ other language who have such syntax. Swift? no. Python? no. TypeScript? no. AFAIK no one on this planet have such thing so far. It se... -
01:42 AM Feature #16276: For consideration: "private do...end" / "protected do...end"
- Yes, I agree we don't copy C++ / Java. What I wonder is _any_ other language who have such syntax. Swift? no. Python? no. TypeScript? no. AFAIK no one on this planet have such thing so far. It seems to me that IDEs are not the answer...
-
08:54 PM Feature #16131: Remove $SAFE, taint and trust
- Most of the pull requests to fix taint/$SAFE issues have been merged. These are the remaining ones that haven't been merged yet:
Bundled gems with external upstreams:
* rake: https://github.com/ruby/rake/pull/329 (Can one of the ... -
07:30 PM Feature #15123: Enumerable#compact proposal
- @matz: Its presence in Array and Hash make it more of a common interface that I could see being defined for Enumerable in general, though the immediate usecases are around Lazy. As mentioned above, sometimes one wants to use Enumerators ...
-
06:06 PM Bug #16285 (Closed): Setting mtime to zero on Zlib::GzipWriter does nothing
- Run the following script to observe the issue
```ruby
require 'zlib'
def write_gzip_file(content, mtime)
File.open('archieve.gz', 'w') do |f|
gz = Zlib::GzipWriter.new(f)
gz.mtime = mtime
gz.write(content)
gz.... - 03:38 PM Revision 5f8795a0 (git): * 2019-10-31 [ci skip]
-
03:37 PM Revision 4c7f789e (git): Allow only one argument for keyword_init struct
- ```
irb(main):001:0> RUBY_VERSION
=> "2.6.5"
irb(main):002:0> S = Struct.new(:foo, keyword_init: true)
=> S(keyword_init: true)
irb(main):003:0> S.new({foo: 23424}, 234) # I don't think this is intentional
=> #<struct S foo=23424>
irb(ma... -
02:10 PM Bug #16284: Net/HTTP consuming multiple times more memory compared to other libraries
- Thank you for the report. Unfortunately, I cannot reproduce the issue. The result on my Linux machine is completely opposite against yours.
```
$ ruby -v
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
$ ruby t.rb EXC... -
12:14 PM Bug #16284 (Closed): Net/HTTP consuming multiple times more memory compared to other libraries
- I have an issue where Net/HTTP library is causing very high memory usage when requesting for medium to large sized content.
Here is the script to reproduce the issue:
```
gem 'excon'
require 'uri'
require 'net/http'
require ... -
12:36 PM Revision 6c3ed0d7 (git): Update the latest versions from upstream repository of racc
-
12:02 PM Revision e6d611ad (git): Regenerate the output results for test fixtures of racc
-
12:00 PM Revision d3272fcb (git): Update the latest structure for racc upstream
-
07:27 AM Bug #16283: A fork in transaction of PG cause Segmentation fault
- FYI:
```
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.5
BuildVersion: 18F132
``` -
02:46 AM Feature #16122: Data: simple immutable value object
- zverok (Victor Shepelev) wrote:
> So, considering all the points above, it could be either _multiple_ settings: `immutable: true, enumerable: false, hash_accessors: false`
I think that's a great idea. That way it's possible for every...
10/29/2019
-
11:25 PM Revision c54635c0 (git): Update Unicode Emoji version from 12.0 to 12.1.
- This update does not add any new codepoint assignments, it just
expands the range of emoji codepoint sequences recommended for
public interchange.
Depending on how emoji data files are cached, this commit may
require manual intervention... -
09:51 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- Eregon (Benoit Daloze) wrote:
> Also worth noting that `private def` actually defines two methods, one public and then a copy of it as private, overriding the public one in the method table.
I don't think this is true. `private :met... -
09:17 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- I kind of like this idea as it would make it clear which methods are private by indentation.
`private` alone is indeed hard to notice as soon as there are a few methods in the class.
OTOH, using this to change a method from private t... -
08:38 PM Feature #16276: For consideration: "private do...end" / "protected do...end"
- shevegen (Robert A. Heiler) wrote:
> > As noted in the pseudocode above, we can clean up some of the issues around
> ...
Agree with all you said and appreciate the detailed feedback - but on this, and in many ways on the use of `send... -
06:28 PM Bug #16283 (Third Party's Issue): A fork in transaction of PG cause Segmentation fault
- This looks like the Mac OS getaddrinfo bug. See the part of the C-level backtrace before the crash:
```
/usr/lib/system/libsystem_platform.dylib(_sigtramp+0x1d) [0x7fff7cbf8b5d]
/usr/lib/system/libsystem_trace.dylib(_os_log_preferen... -
09:42 AM Bug #16283: A fork in transaction of PG cause Segmentation fault
- Pretty sure that's the OSX specific bug that got fixed in 2.6.4 or 2.6.5 (This one IIRC but I might be wrong https://bugs.ruby-lang.org/issues/15887).
Can you try with 2.6.5 ? -
03:55 AM Bug #16283 (Third Party's Issue): A fork in transaction of PG cause Segmentation fault
- Call Kernel#fork in transaction of Postgres and call some Socket method in fork's block, then ruby on the child process abort with segmentation fault.
Conceptual code:
```
MGModel.connection.transaction do
# Do something
... - 03:14 PM Revision 92c13380 (git): * 2019-10-30 [ci skip]
-
03:13 PM Revision 22dbbbeb (git): Compacting the heap can cause GC, so disable it
- When we compact the heap, various st tables are updated, particularly
the table that contains the object id map. Updating an st table can
cause a GC to occur, and we need to prevent any GC from happening while
moving or updating referen... -
01:40 PM Revision fee5cde0 (git): Fix tests for CVE-2018-6914
- Since the current working directory is not involved in `Tempfile`
and `Dir.mktmpdir` (except for the last resort), it is incorrect
to derive the traversal path from it. Also, since the rubyspec
temporary directory is created under the b... -
11:05 AM Feature #16275: Revert `.:` syntax
- Jeremy – I’m sorry for the overreach in that clumsy wording. Let me rephrase: what I saw here was a fair number of comments supporting the removal of an already-implemented feature of 2.7 that I felt had good potential and that I was per...
-
07:38 AM Revision ad4da866 (git): Check for nonnull attribute in configure
-
07:05 AM Revision 9195ed18 (git): Revert "Check for nonnull attribute in configure"
- This reverts commit 54eb51d72bc43f90b595f0d7ffb5069ebf1a56d9.
Windows build failure. See also https://github.com/ruby/ruby/runs/278718805 -
05:40 AM Revision 7bf51ced (git): test/rubygems/test_gem.rb: early failure when there is /tmp/Gemfile
- Some test cases in rubygems assume that /tmp/Gemfile does not exist.
If it does, they fail with very difficult-to-understand message:
```
[ 149/2108] TestGemBundlerVersionFinder#test_bundler_version_with_bundle_update_bundler = 0.00
1... -
04:16 AM Revision 79a7fd91 (git): Revert "Revert "[ruby/rdoc] Use omit of test-unit instead of skip of minitest""
- This reverts commit ca5812fe4516a10cc687281f9e47e1a08449f1ab.
Now tool/lib/minitest provides "omit", so it should work. -
04:15 AM Revision 1820aeee (git): tool/lib/minitest/unit.rb: add "omit" as an alias to "skip"
- According to rdoc, test-unit provides omit instead of skip.
This is a compatibility layer to make it work with both test-unit and
tool/lib/minitest. -
03:57 AM Revision ca5812fe (git): Revert "[ruby/rdoc] Use omit of test-unit instead of skip of minitest"
- This reverts commit b4da6fc1c277190bbd10e795ebf3be45772038e8.
`make test-all` uses minitest, which led to "undefined method `omit'" -
03:34 AM Revision 9525541d (git): [ruby/rdoc] Use Dir.glob to convert short path of Dir.tmpdir to long path
- https://github.com/ruby/rdoc/commit/ba16e44572
-
03:34 AM Revision c8ce37d4 (git): [ruby/rdoc] Support different drive latters in include paths
- https://github.com/ruby/rdoc/commit/946d2592e2
-
03:34 AM Revision b4da6fc1 (git): [ruby/rdoc] Use omit of test-unit instead of skip of minitest
- https://github.com/ruby/rdoc/commit/1c5bf2ae1d
-
03:12 AM Revision 54eb51d7 (git): Check for nonnull attribute in configure
-
03:07 AM Revision b86e5c9f (git): Clang can also use C call cache
- Previously this was restricted to only gcc because of the
GCC_VERSION_SINCE check (which explicitly excludes clang).
GCC 3.3.0 is quite old so I feel relatively safe assuming that all
reasonable versions of clang support this. -
02:32 AM Revision 85b88c1d (git): Let the arrays for the singleton and instance method reflection helpers be initialized to the methods count
-
02:32 AM Revision fecaa6e9 (git): Let the backtrace array constructed in backtrace_collect be initialized with the size already given
-
02:31 AM Revision 00953629 (git): Right size the vm_default_params hash
-
02:31 AM Revision 0e68913f (git): Right size the Enumerator internal lazy_use_super_method hash
-
02:31 AM Revision 4480d689 (git): Right size the compile option hash
-
02:30 AM Revision 65744fb1 (git): Right size the iseq coverage branches tmp array - initializes with 5 elements
-
01:35 AM Revision 05476277 (git): Version 0.0.4
-
12:01 AM Feature #16282: Add "call data" wrapper IMEMO object so inline cache can be updated
- Actually, I think this makes performance worse because it removes the "define". So there will be only one. I will fix it to maintain the macro.