Skip to content

Instantly share code, notes, and snippets.

View rrosenblum's full-sized avatar

Ryan Rosenblum rrosenblum

  • Splunk
  • Atlanta, Georgia
View GitHub Profile
@rrosenblum
rrosenblum / keybase.md
Last active September 11, 2019 22:23
Keybase

Keybase proof

I hereby claim:

  • I am rrosenblum on github.
  • I am rrosenblum (https://keybase.io/rrosenblum) on keybase.
  • I have a public key ASAWB0Cq7_thAZ5UTnAASFOr_6Ck_hiQcx8DZaytW4A1nAo

To claim this, I am signing this object:

diff --git a/lib/rubocop/cop/style/unpack_first.rb b/lib/rubocop/cop/style/unpack_first.rb
index c1d4af411..da0a2e221 100644
--- a/lib/rubocop/cop/style/unpack_first.rb
+++ b/lib/rubocop/cop/style/unpack_first.rb
@@ -28,16 +28,23 @@ module RuboCop
def_node_matcher :unpack_and_first_element?, <<-PATTERN
{
- (send (send (...) :unpack (...)) :first)
- (send (send (...) :unpack (...)) {:[] :slice :at} (int 0))
@rrosenblum
rrosenblum / print_val.exs
Created January 30, 2018 13:53
Output a variable in elixir. This is useful for codewars where we don't have access to the debugger.
def print_val(val) do
val |> inspect |> IO.puts
val
end