[#82706] [Ruby trunk Bug#13851] getting "can't modify string; temporarily locked" on non-frozen instances — cardoso_tiago@...
Issue #13851 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/07
[#82853] [Ruby trunk Bug#13916] Race condition when sending a signal to a new fork — russell.davis@...
Issue #13916 has been reported by russelldavis (Russell Davis).
3 messages
2017/09/19
[#82892] [Ruby trunk Bug#13921] buffered read_nonblock doesn't work as expected using SSLSocket — cardoso_tiago@...
Issue #13921 has been updated by chucke (Tiago Cardoso).
3 messages
2017/09/20
[ruby-core:83007] [Ruby trunk Bug#13939] Ruby 2.4.2 has issue supporting Seattle.rb style for define_method
From:
asterite@...
Date:
2017-09-25 21:10:46 UTC
List:
ruby-core #83007
Issue #13939 has been updated by asterite (Ary Borenszweig).
I think this was introduced in https://github.com/ruby/ruby/commit/9987109
Basically, any call `foo arg { }` when `arg` is a literal now gives an error.
I think this is a huge breaking change, for example if you had something like:
```
describe "foo" {
it "does something" {
}
}
```
Now it no longer works, though I don't know if someone writes code like that.
Maybe the error makes sense because `{` binds the thing to its left as a block, but I don't know :-)
----------------------------------------
Bug #13939: Ruby 2.4.2 has issue supporting Seattle.rb style for define_method
https://bugs.ruby-lang.org/issues/13939#change-66916
* Author: danielpclark (Daniel P. Clark)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
In Ruby 2.3 & 2.4.0 you can do this
~~~ruby
define_method :some_method_name { "asdf" }
~~~
As of my trying 2.4.2 this is no longer supported. Anyone who tries to load my 'read_source' gem will get a failure message in require without explaining the specific area of code.
~~~
SyntaxError: /home/danielpclark/dev/read_source/test/support/example.rb:18: syntax error, unexpected '{', expecting keyword_end
ethod :also_attr_method_name { "asdf" }
^
/home/danielpclark/dev/read_source/test/support/example.rb:18: syntax error, unexpected '}', expecting keyword_end
so_attr_method_name { "asdf" }
^
from (irb):2:in `require_relative'
from (irb):2
from /usr/share/rvm/rubies/ruby-2.4.2/bin/irb:11:in `<main>'
~~~
To fix my gem for Ruby 2.4.2 I now have to wrap the method name in parenthesis `()`
~~~ruby
define_method(:some_method_name) { "asdf" }
~~~
And that will work. But I find this odd as the following will still work in 2.4.2:
~~~ruby
define_method :johny, instance_method(:apple)
~~~
Which is still Seattle.rb style.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>