Skip to content

Commit 3a3ae17

Browse files
committed
nqp::xxx -> nqp:xxx
1 parent 49838b9 commit 3a3ae17

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

examples/rubyish/t/00hello-worldish.t

100644100755
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
puts "1..4"
2+
23
def capitalize(s)
3-
nqp::uc(nqp::substr(s, 0, 1)) ~ nqp::lc(nqp::substr(s, 1));
4+
nqp:uc(nqp:substr(s, 0, 1)) ~ nqp:lc(nqp:substr(s, 1));
45
end
56

67
class HelloWorld
@@ -14,7 +15,7 @@ class HelloWorld
1415
end
1516

1617
hello = HelloWorld.new("worldish")
17-
puts "#{nqp::can(hello, 'sayHi')? 'ok' : 'nok'} 2 - can say Hi"
18-
puts "#{nqp::can(hello, 'sayBye')? 'nok' : 'ok'} 3 - can't say Bye"
18+
puts "#{nqp:can(hello, 'sayHi')? 'ok' : 'nok'} 2 - can say Hi"
19+
puts "#{nqp:can(hello, 'sayBye')? 'nok' : 'ok'} 3 - can't say Bye"
1920
hello.sayHi
2021

examples/rubyish/t/nqp-ops.t

100644100755
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
puts "1..11"
2-
nqp::say("ok 1 - nqp::say")
3-
nqp::print("ok 2 - nqp::print with new-line\n")
4-
puts nqp::concat("ok ", '3 - nqp::concat')
5-
puts nqp::substr("nok 4 - nqp::substr", 1)
6-
puts nqp::lc("OK 5 - nQp::lC")
7-
nqp::print nqp::chr(nqp::ord('o')); puts 'k 6 - nqp::ord and nqp::chr'
2+
nqp:say("ok 1 - nqp:say")
3+
nqp:print("ok 2 - nqp:print with new-line\n")
4+
puts nqp:concat("ok ", '3 - nqp:concat')
5+
puts nqp:substr("nok 4 - nqp:substr", 1)
6+
puts nqp:lc("OK 5 - nqp:lC")
7+
nqp:print nqp:chr(nqp:ord('o')); puts 'k 6 - nqp:ord and nqp:chr'
88

99
def ok(i,msg)
10-
nqp::say("ok #{i} - #{msg}");
10+
nqp:say("ok #{i} - #{msg}");
1111
end
1212
def nok(i,msg)
13-
nqp::say("nok #{i} - #{msg}");
13+
nqp:say("nok #{i} - #{msg}");
1414
end
1515

16-
nqp::if(2+2 == 4, ok(7, "nqp::if (true)"), nok(7, "nqp::if (true)"))
17-
nqp::if(2+2 == 5, nok(8, "nqp::if (true)"), ok(8, "nqp::if (false)"))
16+
nqp:if(2+2 == 4, ok(7, "nqp:if (true)"), nok(7, "nqp:if (true)"))
17+
nqp:if(2+2 == 5, nok(8, "nqp:if (true)"), ok(8, "nqp:if (false)"))
1818

1919
n = 9
2020

21-
nqp::while n <= 11, begin
22-
ok(n, "nqp::while (#{n})")
21+
nqp:while n <= 11, begin
22+
ok(n, "nqp:while (#{n})")
2323
n += 1
2424
end

0 commit comments

Comments
 (0)