@@ -11,7 +11,7 @@ const GdxForConverter = {
1111 if ( ( this . _isSelf ( receiver ) || receiver === Opal . nil ) && ! rubyBlock ) {
1212 switch ( name ) {
1313 case 'gdx_for_acceleration' :
14- if ( args . length === 1 && this . _isString ( args [ 0 ] ) ) {
14+ if ( args . length === 1 && this . _isStringOrBlock ( args [ 0 ] ) ) {
1515 block = this . _createBlock ( 'gdxfor_getAcceleration' , 'value' ) ;
1616 this . _addInput (
1717 block ,
@@ -26,7 +26,7 @@ const GdxForConverter = {
2626 }
2727 break ;
2828 case 'gdx_for_tilted?' :
29- if ( args . length === 1 && this . _isString ( args [ 0 ] ) ) {
29+ if ( args . length === 1 && this . _isStringOrBlock ( args [ 0 ] ) ) {
3030 block = this . _createBlock ( 'gdxfor_isTilted' , 'value' ) ;
3131 this . _addInput (
3232 block ,
@@ -36,7 +36,7 @@ const GdxForConverter = {
3636 }
3737 break ;
3838 case 'gdx_for_tilt_angle' :
39- if ( args . length === 1 && this . _isString ( args [ 0 ] ) ) {
39+ if ( args . length === 1 && this . _isStringOrBlock ( args [ 0 ] ) ) {
4040 block = this . _createBlock ( 'gdxfor_getTilt' , 'value' ) ;
4141 this . _addInput (
4242 block ,
@@ -51,7 +51,7 @@ const GdxForConverter = {
5151 }
5252 break ;
5353 case 'gdx_for_spin_speed' :
54- if ( args . length === 1 && this . _isString ( args [ 0 ] ) ) {
54+ if ( args . length === 1 && this . _isStringOrBlock ( args [ 0 ] ) ) {
5555 block = this . _createBlock ( 'gdxfor_getSpinSpeed' , 'value' ) ;
5656 this . _addInput (
5757 block ,
@@ -64,7 +64,7 @@ const GdxForConverter = {
6464 } else if ( ( this . _isSelf ( receiver ) || receiver === Opal . nil ) &&
6565 name === 'when' &&
6666 args . length === 2 && args [ 0 ] . type === 'sym' &&
67- this . _isString ( args [ 1 ] ) &&
67+ this . _isStringOrBlock ( args [ 1 ] ) &&
6868 rubyBlockArgs && rubyBlockArgs . length === 0 &&
6969 rubyBlock ) {
7070 switch ( args [ 0 ] . value ) {
0 commit comments