 OK, thank you for the welcome. It's good to be back. For those of you who don't know me, my name is Ted, and you can find me online as Drenmi. I'm the VP of engineering at a company called Engage Rocket. We build HR products out of Block 71, and we use Rails a lot. And we're also hiring, so if you're interested in knowing more about the challenges we're facing and how you can be a part of solving them, you can either talk to me after the presentation, or you can ping me on any of the Singapore Slack channels. I'm also a core team member of RuboCop, and we're also looking for new contributors of all capacities. So if you're interested in contributing to open source, but you don't really know where to start, then you can also come talk to me or ping me on Slack. So I'm going to give five random Ruby tips today. So I chose the theme 2.5 random Ruby tips. So most of these tips will be out of the newer releases of Ruby. And I'm hoping this can entice all of you to upgrade your rubies and your dependencies. So Ruby 2.2 has been deprecated in March. If you're on a very old version, it's probably a good idea to upgrade. It's sort of like doing the dishes right where it's much easier to just do it a little bit at a time than to save up this insurmountable dish mountain. So there is this ancient proverb that says that friends don't let friends stay on old Ruby version. OK. So Ruby has taken some ideas from active support. And the first thing they took was the hash slice method. So now if you have a hash and you want another hash that has only some of the keys inside, you can call slice on it. And if you're mostly using Rails, you won't notice any difference because you already had this in active support. But Rubocop does not have active support as a dependency. So to me, this is a very, very nice feature because I find myself wanting this at least once per week. Unfortunately, we still support the Ruby 2.3 and 2.4. So we can't use it just yet. But maybe in two years from now, I'm looking forward to using it. Look at the query you killed, Jim. The second thing they took was the transform keys method, which allows you to take in a hash and transform the keys of that hash any way you please. So in this example, I'm just turning the keys into strings from symbol. And this one gives you a copy of the hash. And there is also a dangerous version that modifies the hash in place. So you just add the bang at the end. Yes? What happens if these value values are objects or arrays or anything which is referenced by print? Will this create copies of the values also or just use the same values? That's a good question. I'm thinking it will keep the references. But I can't tell for sure. We'll look that up after the hook. Yeah. Do you have a lot of hashes with objects in this case? No, I don't. I came from C++ back. Right, right. Yeah. OK, so the next thing is you can now pass patterns as arguments to a lot of the innumerable methods. So for example, the any method where previously we need to pass a block, it now does a case comparison. So the triple equals method is applied if you pass an argument. So you can pass it any object literal to do a comparison. So there's at least one Hawaii in there. And this, you might be familiar with this comparison from the case statement. So you can do everything here that you could do in a case statement. So you could do a type check. I don't know why you would want to do that, but you can. So in this case, I'm checking that all the pizzas are actually real pizzas. Arguably, Hawaii is not a real pizza, depending who you ask, but in this example, it is. And you can pass regular expressions, which is probably the most common use case for this. OK, this comes with a warning. So these innumerable methods, like all and any, they have vacuous truth, which means that if it's empty, it's always true. So you can have situations where you think you have a collection of numbers. And then they are both odd and even at the same time, because there are no numbers in there, which at first doesn't make sense. But it's mathematically correct. And the numbers are all responding to cat emoji and returning truth. Right, so the fourth tip is you can now create structs with keyword arguments. So it's a different syntax from the one you use in method definitions. Because when you create a struct, it's just a method call, and it doesn't have room for more syntax inside without conflicting with other syntax. So what you need to do is you need to pass a keyword init argument and set it to true. And your struct will now have keyword arguments. This also comes with a warning. The errors are not as good as the method definition kind. If you forget the keyword, it will just tell you argument error, wrong number of arguments, got one but expected zero. If this was a method definition, it will also tell you that these keys were required, and then it will put the name of the keys. It doesn't do this with the struct. So this might be a misleading you need to dig a bit deeper to debug. The last tip was supposed to be that bundler is now bundled in the standard library, but they found some huge problem, quote, end quote, with it. It doesn't say what the problem was, but it's apparently huge. So it was postponed, maybe in 2.6 or even 3.0. So instead, I included a bonus one, which is that you can use emoji, which we just learned is very important nowadays, because Ruby is UTF 8, right? So combining this with these other tips, you can have a struct that is a cat emoji and a struct that is a dog emoji. And with this new enumerable pattern syntax, you can just pass the emoji in and see if all the pets are cats. However, RuboCop will be here. OK, RuboCop will give you a warning here, because it says you should use ASCII identifiers. Yes. Yes. Now there's a problem. You can't define classes with emoji, because class names need to start with an uppercase ASCII character. But somehow, this does not apply when you're aliasing classes. So you can just define a class and then assign it to a cat emoji. That's all. Thank you. Absolutely. Could you get your name higher? This is not the real thing, though. Maybe. It sounds like another talk coming up.