@@ -11,7 +11,7 @@ const GdxForConverter = {
11
11
if ( ( this . _isSelf ( receiver ) || receiver === Opal . nil ) && ! rubyBlock ) {
12
12
switch ( name ) {
13
13
case 'gdx_for_acceleration' :
14
- if ( args . length === 1 && this . _isString ( args [ 0 ] ) ) {
14
+ if ( args . length === 1 && this . _isStringOrBlock ( args [ 0 ] ) ) {
15
15
block = this . _createBlock ( 'gdxfor_getAcceleration' , 'value' ) ;
16
16
this . _addInput (
17
17
block ,
@@ -26,7 +26,7 @@ const GdxForConverter = {
26
26
}
27
27
break ;
28
28
case 'gdx_for_tilted?' :
29
- if ( args . length === 1 && this . _isString ( args [ 0 ] ) ) {
29
+ if ( args . length === 1 && this . _isStringOrBlock ( args [ 0 ] ) ) {
30
30
block = this . _createBlock ( 'gdxfor_isTilted' , 'value' ) ;
31
31
this . _addInput (
32
32
block ,
@@ -36,7 +36,7 @@ const GdxForConverter = {
36
36
}
37
37
break ;
38
38
case 'gdx_for_tilt_angle' :
39
- if ( args . length === 1 && this . _isString ( args [ 0 ] ) ) {
39
+ if ( args . length === 1 && this . _isStringOrBlock ( args [ 0 ] ) ) {
40
40
block = this . _createBlock ( 'gdxfor_getTilt' , 'value' ) ;
41
41
this . _addInput (
42
42
block ,
@@ -51,7 +51,7 @@ const GdxForConverter = {
51
51
}
52
52
break ;
53
53
case 'gdx_for_spin_speed' :
54
- if ( args . length === 1 && this . _isString ( args [ 0 ] ) ) {
54
+ if ( args . length === 1 && this . _isStringOrBlock ( args [ 0 ] ) ) {
55
55
block = this . _createBlock ( 'gdxfor_getSpinSpeed' , 'value' ) ;
56
56
this . _addInput (
57
57
block ,
@@ -64,7 +64,7 @@ const GdxForConverter = {
64
64
} else if ( ( this . _isSelf ( receiver ) || receiver === Opal . nil ) &&
65
65
name === 'when' &&
66
66
args . length === 2 && args [ 0 ] . type === 'sym' &&
67
- this . _isString ( args [ 1 ] ) &&
67
+ this . _isStringOrBlock ( args [ 1 ] ) &&
68
68
rubyBlockArgs && rubyBlockArgs . length === 0 &&
69
69
rubyBlock ) {
70
70
switch ( args [ 0 ] . value ) {
0 commit comments