General

Profile

roroco (roro co)

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 2 2

Activity

04/26/2015

02:27 PM Ruby Bug #11099: def assert method raise syntax error
~~~ruby
class AsrErr < StandardError
end
def asr(r, msg=nil, *args, &blk)
unless r
if msg
raise AsrErr
end
end
end
a = 2
asr (a > 0 and a < 1)
~~~
I hope `asr(a > 0 and a < 1)` can also work
roroco (roro co)
02:24 PM Ruby Bug #11099 (Rejected): def assert method raise syntax error
In ruby 2.2, when i try
~~~ruby
def assert(*args, &blk)
end
assert(a > 0 and a < 1)
~~~
it will raise
~~~
Uncaught exception: /home/roroco/Dropbox/rbs/ro_btc/ex/ex.rb:5: syntax error, unexpected keyword_and, expecting ...
roroco (roro co)

01/23/2015

10:26 AM Ruby Feature #10773: nested module should work in instance_eval
my ruby version:
~~~
roroco@roroco ~ $ ruby -v
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
~~~
my sys info:
~~~
roroco@roroco ~ $ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Descript...
roroco (roro co)
10:16 AM Ruby Feature #10773 (Rejected): nested module should work in instance_eval
see my code:
~~~
module M
module M2
end
end
class C
include M
def ivk_m2(*args, &blk)
M2
end
end
C.new.ivk_m2 # work
C.new.instance_eval do
meth_in_m # work
M2 # not work
end
~~~
and outp...
roroco (roro co)

Also available in: Atom