[#78949] [Ruby trunk Feature#13095] [PATCH] io.c (rb_f_syscall): remove deprecation notice — kosaki.motohiro@...
Issue #13095 has been updated by Motohiro KOSAKI.
3 messages
2017/01/03
[#78997] [Ruby trunk Bug#13110] Byte-based operations for String — shugo@...
Issue #13110 has been updated by Shugo Maeda.
3 messages
2017/01/06
[#79228] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150] — Eric Wong <normalperson@...>
naruse@ruby-lang.org wrote:
5 messages
2017/01/23
[#79511] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Eric Wong <normalperson@...>
2017/02/13
Eric Wong <normalperson@yhbt.net> wrote:
[#79518] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Nobuyoshi Nakada <nobu@...>
2017/02/13
On 2017/02/13 10:04, Eric Wong wrote:
[#79298] [Ruby trunk Bug#13085][Assigned] io.c io_fwrite creates garbage — nobu@...
Issue #13085 has been updated by Nobuyoshi Nakada.
3 messages
2017/01/29
[#79337] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write — SASADA Koichi <ko1@...>
Eric:
4 messages
2017/01/31
[#79352] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write
— Eric Wong <normalperson@...>
2017/01/31
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:79117] [Ruby trunk Bug#12177][Closed] Using `if:` as symbol in hash with new hash syntax in irb console is not working
From:
nobu@...
Date:
2017-01-18 06:30:51 UTC
List:
ruby-core #79117
Issue #12177 has been updated by Nobuyoshi Nakada.
Status changed from Assigned to Closed
----------------------------------------
Bug #12177: Using `if:` as symbol in hash with new hash syntax in irb console is not working
https://bugs.ruby-lang.org/issues/12177#change-62527
* Author: Niels Kristian
* Status: Closed
* Priority: Normal
* Assignee: Keiju Ishitsuka
* Target version:
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Try running **irb** and past this in:
~~~
# This works
class TestClass
@_alerts_config = {}
class << self
attr_accessor :_alerts_config
end
def self.monitor value_name, *args
self._alerts_config[value_name] = args.first
end
monitor "test_attr", alert: "test@example.com", :if => Proc.new{|instance| instance.nil? }, with_message: "Some error"
end
~~~
This will work. However if the `:if =>` is changed to `if: ` then the syntax renders invalid.
~~~
# This does NOT work
class TestClass
@_alerts_config = {}
class << self
attr_accessor :_alerts_config
end
def self.monitor value_name, *args
self._alerts_config[value_name] = args.first
end
monitor "test_attr", alert: "test@example.com", if: Proc.new{|instance| instance.nil? }, with_message: "Some error"
end
~~~
--
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>