General

Profile

bradgessler (Brad Gessler)

  • Login: bradgessler
  • Registered on: 01/18/2024
  • Last sign in: 04/10/2025

Issues

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

Activity

10/29/2024

07:33 AM Ruby Feature #20852 (Rejected): Anonymous HEREDOC blocks

Consider the following code.
```ruby
# Consider the following code.
Markdown.render <<~MARKDOWN
# Hello there
This is a Markdown file. See?

1. This is a list
2. With items
3. And more items
MARKDOWN
```
T...
bradgessler (Brad Gessler)

09/03/2024

03:37 PM Ruby Feature #20525: Percent string literal with indentation support or String#dedent
Oh interesting, I thought that was a typo 😂.
I was playing around with characters after I wrote this and found something that I think looks a little better than the "}" thing:
```ruby
markdown <<~___
# Hello
How are you do...
bradgessler (Brad Gessler)
08:31 AM Ruby Feature #20525: Percent string literal with indentation support or String#dedent
Same reason you can conjure up a Proc via `-> {}` — the syntax looks cleaner and you don't have to stop and try to name it.
Not having to name a string is a pretty big boost in terms staying in the flow.
The second thing: it looks ...
bradgessler (Brad Gessler)

07/31/2024

05:14 AM Ruby Feature #20525: Percent string literal with indentation support or String#dedent
Actually this looks decent:
```rb
Markdown ~{
# Hi!
This is markdown
}
```
bradgessler (Brad Gessler)

06/04/2024

10:35 PM Ruby Feature #20525 (Rejected): Percent string literal with indentation support or String#dedent
I have code that looks like this in an application:
```ruby
ContentSlide(title: "Why Phlex?"){
Markdown <<~MARKDOWN
* Because its fun
* Because its super-de-dooper
MARKDOWN
},
```
The "squiggle" HEREDOCs strips the...
bradgessler (Brad Gessler)
10:23 PM Ruby Feature #19458: Expose HEREDOC identifier
I'm working with some code in Phlex that would benefit from introspecting the name of the HEREDOC. Here's what I currently have:
```ruby
ContentSlide(title: "Why Phlex?"){
Markdown <<~MARKDOWN
* Because its ...
bradgessler (Brad Gessler)

05/24/2024

09:14 PM Ruby Feature #20508 (Open): Explicit access to *, **, &, and ...
I find debugging and certain meta-programming tasks challenging because there's no explicit APIs for accessing certain types of arguments in Ruby.
Here's some example code:
```ruby
def splats(one, *, two: nil, **, &)
# These wo...
bradgessler (Brad Gessler)

03/01/2024

05:24 AM Ruby Feature #20318: Pattern matching `case ... in` support for triple-dot arguments
Add array example. bradgessler (Brad Gessler)
03:11 AM Ruby Feature #20318 (Open): Pattern matching `case ... in` support for triple-dot arguments

# Premise
Sometimes when I'm creating a method for an API, I'd like to do pattern matching against the arguments. Today I have to do something like this:
```ruby
def foo(*args, **kwargs, &block)
case { args:, kwargs:, block: ...
bradgessler (Brad Gessler)

03/06/2022

10:03 PM Ruby Revision 8ae09706 (git): [rubygems/rubygems] Update README.md.tt
Reduce the number of steps required to install a gem from two steps to one by using `bundle add`
https://github.com/rubygems/rubygems/commit/2c968420cd
bradgessler (Brad Gessler)

Also available in: Atom