rickhull · GitHub

Description

@rickhull

Here is CRuby / MRI:

[nix-shell:~]$ irb --version
irb 1.2.6 (2020-09-14)
[nix-shell:~]$ irb
irb(main):001:0> 5r
=> (5/1)
irb(main):002:0> 5r**2
=> (25/1)
irb(main):003:0> 5**2
=> 25
irb(main):004:0> 5.0**2
=> 25.0
irb(main):005:0> 5r**2r
=> (25/1)

Here is mruby:

[nix-shell:~]$ mirb --version
mruby 3.1.0 (2022-05-12)
[nix-shell:~]$ mirb
mirb - Embeddable Interactive Ruby Shell
> 5r
 => (5/1)
> 5r**2
undefined method '**' (NoMethodError)
> 5**2
 => 25
> 5.0**2
 => 25.0
> 5**2r
 => 25

Metadata

Metadata

Assignees

No one assigned

Labels

No labels

No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Read the original on github.com ↗