General

Profile

jballanc (Joshua Ballanco)

  • Login: jballanc
  • Email: jballanc@gmail.com
  • Registered on: 04/01/2009
  • Last sign in: 02/13/2015

Issues

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

Activity

11/03/2014

06:59 PM Ruby Bug #10450: multiple assignment in conditional
Ok, yes...but if your intention with this feature request is simply to treat the multiple-assignment statement as a whole as the test condition, you can already do that like so:
~~~
if _ = (a, b = *multi_ret_val_meth)
puts "Multi-...
jballanc (Joshua Ballanco)
10:11 AM Ruby Bug #10450: multiple assignment in conditional
Yes, but consider:
~~~
if a = (b, c = false, false)
puts "a is #{a}, b is #{b}, c is #{c} and everything together is true"
end
~~~
So if you were hoping to use multiple assignment to check the `&&`-ed boolean values of the in...
jballanc (Joshua Ballanco)

10/30/2014

08:56 AM Ruby Bug #10450: multiple assignment in conditional
Which of the multiple values assigned would you have used as the test for the conditional?
~~~
if (a, b = true, false)
puts "Should this run?"
else
puts "Or this?"
end
~~~
jballanc (Joshua Ballanco)

03/27/2014

05:13 PM Ruby Feature #9453: Return symbols of defined methods for `attr` and friends
It's been almost 2 months...any chance we could get a comment on this from the core team? jballanc (Joshua Ballanco)

02/05/2014

12:27 AM Ruby Feature #9453: Return symbols of defined methods for `attr` and friends
Tsuyoshi Sawada wrote:
> What is the point of defining a private accessor method? You can directly refer to the instance variables without using accessors.
The example I gave was just one case of "code in the wild" that would benefit...
jballanc (Joshua Ballanco)

02/03/2014

03:05 PM Ruby Feature #9453: Return symbols of defined methods for `attr` and friends
*bump*
Would be nice if we could get this in 2.2 (if someone could update the target version, I'd appreciate it).
jballanc (Joshua Ballanco)

01/26/2014

05:55 PM Ruby Feature #9453 (Rejected): Return symbols of defined methods for `attr` and friends
With Ruby 2.1 returning a symbol from `def` and `define_method`, that leaves `attr`, `attr_reader`, `attr_writer`, and `attr_accessor` as ways to define methods that still return nil. This is unfortunate, because it prevents the use of m... jballanc (Joshua Ballanco)

01/22/2014

08:52 PM Ruby Misc #9438: Implementation naming
As a point of comparison, I've often heard members of the Python community refer to the original implementation as "CPython". Also, not that this should necessarily carry any weight, but it's worth noting that CPython has its own page on... jballanc (Joshua Ballanco)

11/07/2013

05:34 PM Ruby Feature #8839: Class and module should return the class or module that was opened
Just to throw my 2ยข in...
I think the main benefit to returning a symbol from `def` is that it enables the use of method decorators. Similarly, I would be in favor of returning the class defined from `class` so that we could also buil...
jballanc (Joshua Ballanco)

07/23/2013

04:59 AM Ruby Feature #8661: Add option to print backtrace in reverse order (stack frames first and error last)
You can already accomplish something like this yourself:
```ruby
begin
raise "Hello!"
rescue Exception => e
puts e.backtrace.reverse.join("\n")
puts e.message
end
```
Simple!
jballanc (Joshua Ballanco)

Also available in: Atom