Ruby for All cover image

Favorite Ruby Methods: Part 3 - Strings

Ruby for All

00:00

How to Fix an Invalid Encoding Error in Honey Badger

When you get an error like this, what do you do next? You have to make a decision in your business logic basically. If it's sent in from an API, which I think is what the case was when I ran into it, then you're just going to have to return an error or just stop because you don't want your program to error out later due to poorly encoded string. We were getting errors in our error monitoring in Honey Badger. So that's valid encoding. All right, moving on to sub. Sub returns a copy of itself with only the first occurrence, not all occurrences of the given pattern replaced. G sub is the next one on our list. And

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app